/[hurd]/hurd-l4/task/task.h
ViewVC logotype

Diff of /hurd-l4/task/task.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.3 by marcus, Fri Oct 29 03:26:16 2004 UTC revision 1.4 by marcus, Mon Nov 1 20:54:00 2004 UTC
# Line 50  void switch_thread (l4_thread_id_t from, Line 50  void switch_thread (l4_thread_id_t from,
50    
51  struct task  struct task
52  {  {
   /* The capability object must be the first member of this  
      struct.  */  
   struct hurd_cap_obj obj;  
   
53    /* This is for fast removal from the task_id_to_task hash table.  */    /* This is for fast removal from the task_id_to_task hash table.  */
54    hurd_ihash_locp_t locp;    hurd_ihash_locp_t locp;
55    
# Line 80  error_t task_class_init (); Line 76  error_t task_class_init ();
76     for that task.  The object returned is locked and has one     for that task.  The object returned is locked and has one
77     reference.  */     reference.  */
78  error_t task_alloc (l4_word_t task_id, unsigned int nr_threads,  error_t task_alloc (l4_word_t task_id, unsigned int nr_threads,
79                      l4_thread_id_t *threads, hurd_cap_obj_t *r_obj);                      l4_thread_id_t *threads, task_t *r_task);
80    
81    
82  extern pthread_mutex_t task_id_to_task_lock;  extern pthread_mutex_t task_id_to_task_lock;
# Line 99  task_id_get_task (hurd_task_id_t task_id Line 95  task_id_get_task (hurd_task_id_t task_id
95    pthread_mutex_lock (&task_id_to_task_lock);    pthread_mutex_lock (&task_id_to_task_lock);
96    task = hurd_ihash_find (&task_id_to_task, task_id);    task = hurd_ihash_find (&task_id_to_task, task_id);
97    if (task)    if (task)
98      hurd_cap_obj_ref (&task->obj);      {
99          hurd_cap_obj_t obj = hurd_cap_obj_from_user (task_t, task);
100          hurd_cap_obj_ref (obj);
101        }
102    pthread_mutex_unlock (&task_id_to_task_lock);    pthread_mutex_unlock (&task_id_to_task_lock);
103    
104    return task;    return task;

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26