next up previous contents
Next: Thread Suspend Up: Thread Library Previous: Thread Library   Contents

Thread Creation

struct tcb *thread_create(struct thread_info *tinfo)
This function call is used to create a new thread. tinfo is the pointer to the thread description block of the new thread. The following is the declaration of the thread_info structure.
struct thread_info {
  void *(*run) (void *);
  void *arg;
  unsigned int type;
  unsigned int stack_size;
  int readyTime;
  int execTime;      
  int deadline;
  struct thread_info *recov_info;
}
The return value is the pointer to the thread control block(tcb) of the newly created thread. All the subsequent thread library calls require this value as arguement. The application developer must not modify the contents of this pointer location.
next up previous contents
Next: Thread Suspend Up: Thread Library Previous: Thread Library   Contents
Soumyadeb Mitra 2002-08-07