home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / p_man / cat3 / X11 / XInitThreads.z / XInitThreads
Encoding:
Text File  |  1998-10-30  |  4.4 KB  |  133 lines

  1.  
  2.  
  3.  
  4.      XXXXIIIInnnniiiittttTTTThhhhrrrreeeeaaaaddddssss((((3333XXXX11111111)))) XXXX VVVVeeeerrrrssssiiiioooonnnn 11111111 ((((RRRReeeelllleeeeaaaasssseeee 6666....3333))))  XXXXIIIInnnniiiittttTTTThhhhrrrreeeeaaaaddddssss((((3333XXXX11111111))))
  5.  
  6.  
  7.  
  8.      NNNNAAAAMMMMEEEE
  9.           XInitThreads, XLockDisplay, XUnlockDisplay - multi-threading
  10.           support
  11.  
  12.      SSSSYYYYNNNNTTTTAAAAXXXX
  13.           Status XInitThreads();
  14.  
  15.           void XLockDisplay(_d_i_s_p_l_a_y)
  16.                 Display *_d_i_s_p_l_a_y;
  17.  
  18.           void XUnlockDisplay(_d_i_s_p_l_a_y)
  19.                 Display *_d_i_s_p_l_a_y;
  20.  
  21.      AAAARRRRGGGGUUUUMMMMEEEENNNNTTTTSSSS
  22.           _d_i_s_p_l_a_y   Specifies the connection to the X server.
  23.  
  24.      DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  25.           The _X_I_n_i_t_T_h_r_e_a_d_s function initializes Xlib support for
  26.           concurrent threads.  This function must be the first Xlib
  27.           function a multi-threaded program calls, and it must
  28.           complete before any other Xlib call is made.  This function
  29.           returns a nonzero status if initialization was successful;
  30.           otherwise, it returns zero.  On systems that do not support
  31.           threads, this function always returns zero.
  32.  
  33.           It is only necessary to call this function if multiple
  34.           threads might use Xlib concurrently.  If all calls to Xlib
  35.           functions are protected by some other access mechanism (for
  36.           example, a mutual exclusion lock in a toolkit or through
  37.           explicit client programming), Xlib thread initialization is
  38.           not required.  It is recommended that single-threaded
  39.           programs not call this function.
  40.  
  41.  
  42.           The _X_L_o_c_k_D_i_s_p_l_a_y function locks out all other threads from
  43.           using the specified display.  Other threads attempting to
  44.           use the display will block until the display is unlocked by
  45.           this thread.  Nested calls to _X_L_o_c_k_D_i_s_p_l_a_y work correctly;
  46.           the display will not actually be unlocked until
  47.           _X_U_n_l_o_c_k_D_i_s_p_l_a_y has been called the same number of times as
  48.           _X_L_o_c_k_D_i_s_p_l_a_y.  This function has no effect unless Xlib was
  49.           successfully initialized for threads using _X_I_n_i_t_T_h_r_e_a_d_s.
  50.  
  51.           The _X_U_n_l_o_c_k_D_i_s_p_l_a_y function allows other threads to use the
  52.           specified display again.  Any threads that have blocked on
  53.           the display are allowed to continue.  Nested locking works
  54.           correctly; if _X_L_o_c_k_D_i_s_p_l_a_y has been called multiple times by
  55.           a thread, then _X_U_n_l_o_c_k_D_i_s_p_l_a_y must be called an equal number
  56.           of times before the display is actually unlocked.  This
  57.           function has no effect unless Xlib was successfully
  58.           initialized for threads using _X_I_n_i_t_T_h_r_e_a_d_s.
  59.  
  60.  
  61.  
  62.  
  63.      Page 1                                          (printed 4/30/98)
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.      XXXXIIIInnnniiiittttTTTThhhhrrrreeeeaaaaddddssss((((3333XXXX11111111)))) XXXX VVVVeeeerrrrssssiiiioooonnnn 11111111 ((((RRRReeeelllleeeeaaaasssseeee 6666....3333))))  XXXXIIIInnnniiiittttTTTThhhhrrrreeeeaaaaddddssss((((3333XXXX11111111))))
  71.  
  72.  
  73.  
  74.      NNNNOOOOTTTTEEEESSSS
  75.           The SGI implementation of Xlib supports concurrent threads
  76.           only for the POSIX thread programming model (pthreads).
  77.           _X_I_n_i_t_T_h_r_e_a_d_s will return zero if the application is not
  78.           linked with the pthread run-time library.  See the
  79.           pthreads(5) man page for information about creating a
  80.           pthread process.
  81.  
  82.      SSSSEEEEEEEE AAAALLLLSSSSOOOO
  83.           pthreads(5)
  84.           _X_l_i_b - _C _L_a_n_g_u_a_g_e _X _I_n_t_e_r_f_a_c_e
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.      Page 2                                          (printed 4/30/98)
  130.  
  131.  
  132.  
  133.