XInitThreads, XLockDisplay, XUnlockDisplay − multi-threading support


Status XInitThreads(void);

void XLockDisplay(Display *display);

void XUnlockDisplay(Display *display);



Specifies the connection to the X server.


The XInitThreads function initializes Xlib support for concurrent threads. This function must be the first Xlib function a multi-threaded program calls, and it must complete before any other Xlib call is made. This function returns a nonzero status if initialization was successful; otherwise, it returns zero. On systems that do not support threads, this function always returns zero.

It is only necessary to call this function if multiple threads might use Xlib concurrently. If all calls to Xlib functions are protected by some other access mechanism (for example, a mutual exclusion lock in a toolkit or through explicit client programming), Xlib thread initialization is not required. It is recommended that single-threaded programs not call this function.

The XLockDisplay function locks out all other threads from using the specified display. Other threads attempting to use the display will block until the display is unlocked by this thread. Nested calls to XLockDisplay work correctly; the display will not actually be unlocked until XUnlockDisplay has been called the same number of times as XLockDisplay. This function has no effect unless Xlib was successfully initialized for threads using XInitThreads.

The XUnlockDisplay function allows other threads to use the specified display again. Any threads that have blocked on the display are allowed to continue. Nested locking works correctly; if XLockDisplay has been called multiple times by a thread, then XUnlockDisplay must be called an equal number of times before the display is actually unlocked. This function has no effect unless Xlib was successfully initialized for threads using XInitThreads.


Xlib − C Language X Interface

More Linux Commands

vconfig(8) - VLAN (802.1q) configuration program. (ManPage)
The vconfig program allows you to create and remove vlan-devices on a vlan enabled kernel. Vlan-devices are virtual ethernet devices which represents the virtua

acl_get_entry(3) - get an ACL entry - Linux manual page.....
The acl_get_entry() function obtains a descriptor for an ACL entry as specified by entry_id within the ACL indicated by the argument acl. If the value of entry_

pidof(8) - find the process ID of a running program.........
Pidof finds the process ids (pids) of the named programs. It prints those ids on the standard output. This program is on some systems used in run-level change s

glRasterPos2iv(3gl) - specify the raster position for pixel
The GL maintains a 3D position in window coordinates. This position, called the raster position, is used to position pixel and bitmap write operations. It is ma

FcPatternRemove(3) - Remove one object of the specified type
Removes the value associated with the property object at position id, returning whether the property existed and had a value at that position or not. VERSION Fo

insl(2) - port I/O (System calls - Linux man page)..........
This family of functions is used to do low-level port input and output. The out* functions do port output, the in* functions do port input; the b-suffix functio

grub2-mkpasswd-pbkdf2(1) generate hashed password for GRUB
Generate PBKDF2 password hash. -c, --iteration-count=NUM Number of PBKDF2 iterations -l, --buflen=NUM Length of generated hash -s, --salt=NUM Length of salt -?,

cacafire(1) - libcaca's demonstration applications (ManPage)
This manual page documents briefly the cacademo and cacafire programs. cacademo displays ASCII art effects with animated transitions: metaballs, moire pattern o

oo_define(n) define and configure classes and objects.......
The oo::define command is used to control the configuration of classes, and the oo::objdefine command is used to control the configuration of objects (including

MenuPopdown(3) - unmap a pop-up (Library - Linux man page)
The XtPopdown function performs the following: * Calls XtCheckSubclass to ensure popup_shell is a subclass of Shell. * Checks that popup_shell is currently popp

vfs_dirsort(8) - Sort directory contents - Linux man page...
This VFS module is part of the samba(7) suite. The vfs_dirsort module sorts directory entries alphabetically before sending them to the client. Please be aware

gnutls_dh_params_import_pkcs3(3) - API function (Man Page)
This function will extract the DHParams found in a PKCS3 formatted structure. This is the format generated by openssl dhparam tool. If the structure is PEM enco

We can't live, work or learn in freedom unless the software we use is free.