home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / p_man / cat3p / taskcreate.z / taskcreate
Encoding:
Text File  |  1998-10-20  |  2.9 KB  |  67 lines

  1.  
  2.  
  3.  
  4. TTTTAAAASSSSKKKKCCCCRRRREEEEAAAATTTTEEEE((((3333PPPP))))                                                  TTTTAAAASSSSKKKKCCCCRRRREEEEAAAATTTTEEEE((((3333PPPP))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      taskcreate - create a new task
  10.  
  11. CCCC SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      ####iiiinnnncccclllluuuuddddeeee <<<<ttttaaaasssskkkk....hhhh>>>>
  13.  
  14.      ttttiiiidddd____tttt ttttaaaasssskkkkccccrrrreeeeaaaatttteeee ((((cccchhhhaaaarrrr ****nnnnaaaammmmeeee,,,, vvvvooooiiiidddd ((((****eeeennnnttttrrrryyyy))))(((()))),,,, vvvvooooiiiidddd ****aaaarrrrgggg,,,,
  15.                        iiiinnnntttt sssscccchhhheeeedddd))));;;;
  16.  
  17. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  18.      _T_a_s_k_c_r_e_a_t_e causes a new task to be created for the calling process/task.
  19.      The new task is created via the _s_p_r_o_c(_2) system call, requesting that all
  20.      attributes (e.g. open files, current directory, uid, etc.) be shared.
  21.  
  22.      The new task differs from the calling task as described in _s_p_r_o_c(_2).
  23.  
  24.      The new task will be invoked as follows:
  25.                eeeennnnttttrrrryyyy((((aaaarrrrgggg))))
  26.                vvvvooooiiiidddd ****aaaarrrrgggg;;;;
  27.  
  28.      The _s_c_h_e_d parameter is currently unused and should be set to 0.
  29.  
  30.      No implicit synchronization is implied between tasks - they are free to
  31.      run on any processor in any sequence.  Synchronization must be provided
  32.      by the application using locks and semaphores (see _u_s_i_n_i_t(_3_P)).
  33.  
  34.      Each created task has a task block allocated.  The task blocks are linked
  35.      together and pointed to by _t_a_s_k_h_e_a_d_e_r. The task block structure is
  36.      defined in _t_a_s_k._h.
  37.  
  38.      _T_a_s_k_c_r_e_a_t_e will fail and no new task will be created if one or more of
  39.      the following are true:
  40.  
  41.      The _s_p_r_o_c(_2) system call fails.
  42.  
  43.      [ENOMEM]       The required memory for the task block or task name was
  44.                     not available.
  45.  
  46. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  47.      sproc(2), taskblock(3P), taskctl(3P), taskdestroy(3P).
  48.  
  49. DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
  50.      Upon successful completion, _t_a_s_k_c_r_e_a_t_e returns the task id of the new
  51.      task.  The task id is guaranteed to be the smallest available.
  52.      Otherwise, a value of -1 is returned to the calling task, and _e_r_r_n_o is
  53.      set to indicate the error.
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.