/[rtmk]/rtmk/thread.h
ViewVC logotype

Diff of /rtmk/thread.h

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

revision 1.13 by jrydberg, Wed Feb 20 20:04:42 2002 UTC revision 1.14 by jrydberg, Thu Feb 21 23:43:58 2002 UTC
# Line 211  struct thread Line 211  struct thread
211    int wait_result;    int wait_result;
212    
213    /* Task that this thread belongs to (i.e., was created in).  */    /* Task that this thread belongs to (i.e., was created in).  */
   
214    struct task *task;    struct task *task;
215    
216    /* Reference counter.  */    /* Reference counter.  */
   
217    int ref_cnt;    int ref_cnt;
218        
219    /* Target dependent members:  */    /* Target dependent members:  */
# Line 223  struct thread Line 221  struct thread
221    
222    /* Kernel stack for thread.  We only maintain one kernel stack    /* Kernel stack for thread.  We only maintain one kernel stack
223       for all activations.  */       for all activations.  */
   
224    vm_offset_t kernel_stack;    vm_offset_t kernel_stack;
225    
226    /* Swap in function, called when thread is given a new stack.  */    /* Swap in function, called when thread is given a new stack.  */
   
227    void (*swap_fn) (void);    void (*swap_fn) (void);
228        
229    /* Timer statistics; execution time in user and kernel mode    /* Timer statistics; execution time in user and kernel mode
230       respectively.  */       respectively.  */
   
231    struct timer timer_user;    struct timer timer_user;
232    struct timer timer_system;    struct timer timer_system;
233    
# Line 271  struct thread Line 266  struct thread
266                                   THREAD_STATE_ZOMBIE)                                   THREAD_STATE_ZOMBIE)
267    
268    int runq_p;    int runq_p;
   
269    struct processor *bound;              /* ??? CPU bound.  */    struct processor *bound;              /* ??? CPU bound.  */
   
270    int suspend_cnt;                      /* Suspend counter.  */    int suspend_cnt;                      /* Suspend counter.  */
271    
272    /* Processor that this thread is bound to run on (if any),    /* Processor that this thread is bound to run on (if any),
273       and processor that this thread last ran on.  */       and processor that this thread last ran on.  */
   
274    struct processor *bound_processor;    struct processor *bound_processor;
275    struct processor *last_processor;    struct processor *last_processor;
276    
277    /* Scheduling policy, priority and pre-multiplied priority.  */    /* Scheduling policy, priority and pre-multiplied priority.  */
     
278    unsigned int sched_priority;    unsigned int sched_priority;
279    unsigned int sched_policy;    unsigned int sched_policy;
280    unsigned int sched_premul;    unsigned int sched_premul;
# Line 291  struct thread Line 282  struct thread
282    
283    /* Original scheduling information when thread have inherited    /* Original scheduling information when thread have inherited
284       priority from a higher-priority thread.  */       priority from a higher-priority thread.  */
   
285    unsigned int original_priority;    unsigned int original_priority;
286    unsigned int original_policy;    unsigned int original_policy;
287    unsigned int original_premul;    unsigned int original_premul;
# Line 299  struct thread Line 289  struct thread
289    
290    /* Kernel IPC port for the thread.  The kernel have receive rights for    /* Kernel IPC port for the thread.  The kernel have receive rights for
291       this port and threads uses it to control the task.  */       this port and threads uses it to control the task.  */
   
292    struct ipc_port *thread_port;    struct ipc_port *thread_port;
293    
294    /* Cache for thread right name in tasks IPC object.  */    /* Send right to (initially) the above port.  This is the
295         right that is returned by thread_self().  */
296    rtmk_port_t thread_right_name;    struct ipc_port *send_thread_port;
297    
298    /* Scratch area for storing information between blocks.      /* Scratch area for storing information between blocks.  
299       Have place for 4 points.  Can also be casted to a structure.  */       Have place for 4 points.  Can also be casted to a structure.  */
   
300    void *scratch_area [4];    void *scratch_area [4];
301    
302    /* Synchronization object that this thread is blocked on.    /* Synchronization object that this thread is blocked on.
303       Used to prevent priority inversion.  */       Used to prevent priority inversion.  */
   
304    struct thread_lock *blocked_lock;    struct thread_lock *blocked_lock;
305    
306    /* True if we have inherited priority from another thread.  */    /* True if we have inherited priority from another thread.  */
     
307    bool inherited_priority_p: 1;    bool inherited_priority_p: 1;
308    
309    /* True if this thread is currently running.  */    /* True if this thread is currently running.  */
   
310    bool running_p: 1;    bool running_p: 1;
311    
312    /* Activation stack.  ACT_STACK_UPPER holds pointer to current    /* Activation stack.  ACT_STACK_UPPER holds pointer to current
313       activation.   ACT_STACK_LOWER is the initial activation.  */       activation.   ACT_STACK_LOWER is the initial activation.  */
   
314    struct activation *act_stack_upper;    struct activation *act_stack_upper;
315    struct activation *act_stack_lower;    struct activation *act_stack_lower;
316  };  };

Legend:
Removed from v.1.13  
changed lines
  Added in v.1.14

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