Warning: main(/www/www/htdocs/style/globals.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/s/syncctl.html on line 1

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/globals.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/s/syncctl.html on line 1

Warning: main(/www/www/htdocs/style/header.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/s/syncctl.html on line 8

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/header.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/s/syncctl.html on line 8

SyncCtl(), SyncCtl_r()

Perform an operation on a synchronization object

Synopsis:

#include <sys/neutrino.h>

int SyncCtl( int cmd,
             sync_t * sync,
             void * data );

int SyncCtl_r( int cmd,
               sync_t * sync,
               void * data );

Arguments:

cmd
The operation type; one of:
sync
A pointer to the synchronization object that you want to manipulate.
data
A pointer to data associated with the command, or a place where the function can store the requested information, depending on the operation.

Library:

libc

Use the -l c option to qcc to link against this library. This library is usually included automatically.

Description:

The SyncCtl() and SyncCtl_r() kernel calls let you:

These functions are similar, except for the way they indicate errors. See the Returns section for details.


Note: Instead of using these kernel calls directly, consider calling pthread_mutex_getprioceiling() or pthread_mutex_setprioceiling().

Returns:

The only difference between these functions is the way they indicate errors:

SyncCtl()
If an error occurs, the function returns -1 and sets errno. Any other value returned indicates success.
SyncCtl_r()
Returns EOK on success. This function does NOT set errno. If an error occurs, the function returns any value listed in the Errors section.

Errors:

EAGAIN
All kernel synchronization event objects are in use.
EFAULT
A fault occurred when the kernel tried to access sync or data.
EINVAL
The synchronization object pointed to by sync doesn't exist, or the ceiling priority value pointed to by data is out of range.
ENOSYS
The SyncCtl() and SyncCtl_r() functions aren't currently supported.

Classification:

QNX Neutrino

Safety:
Cancellation point No
Interrupt handler No
Signal handler Yes
Thread Yes

See also:

pthread_mutex_getprioceiling(), pthread_mutex_setprioceiling(), SyncCondvarSignal(), SyncCondvarWait(), SyncDestroy(), SyncMutexEvent(), SyncMutexLock(), SyncMutexRevive(), SyncMutexUnlock(), SyncTypeCreate()


Warning: main(/www/www/htdocs/style/footer.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/s/syncctl.html on line 240

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/footer.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/s/syncctl.html on line 240