gf_dev_register_thread()

Register a device with a thread

Synopsis:

#include <gf/gf.h>

int gf_dev_register_thread( gf_dev_t gdev );

Arguments:

gdev
The handle for the graphics device to register. This is the handle acquired by gf_dev_attach().

Library:

gf

Description:

This function should be called by threads that wish to register and use an already initialized graphics device. In a multi-threaded application, one thread can call gf_dev_attach() to attach to the graphics device, and other threads can call gf_dev_register_thread() to use the same device.

Returns:

GF_ERR_OK
Success.
GF_ERR_THREAD
An error occurred while registering the thread; check errno.

Classification:

QNX Graphics Framework

Safety:
Interrupt handler No
Signal handler No
Thread Yes

See also:

gf_dev_attach()

Multithreaded applications in the Basic Drawing chapter.