• Home
  • Raw
  • Download

Lines Matching full:thread

38 @file thread.h
39 @brief Thread API
41 The functions in thread.c have for goal to manage mutex, conditions, thread
42 creation and thread pools that accept jobs.
45 /** @defgroup THREAD THREAD - Mutex, conditions, threads and thread pools */
56 * is built without thread support)
85 * is built without thread support)
99 * Waiting thread :
109 * Signaling thread :
123 * One of the thread waiting with opj_cond_wait() will be waken up.
137 /** @name Thread */
140 /** Opaque type for a thread handle */
143 /** User function to execute in a thread
148 /** Creates a new thread.
149 * @param thread_fn Function to run in the new thread.
150 * @param user_data user data provided to the thread function. Might be NULL.
151 * @return a thread handle or NULL in case of failure (can for example happen if the library
152 * is built without thread support)
156 /** Wait for a thread to be finished and release associated resources to the
157 * thread handle.
158 * @param thread the thread to wait for being finished.
160 void opj_thread_join(opj_thread_t* thread);
164 /** @name Thread local storage */
166 /** Opaque type for a thread local storage */
169 /** Get a thread local value corresponding to the provided key.
170 * @param tls thread local storage handle
179 /** Set a thread local value corresponding to the provided key.
180 * @param tls thread local storage handle
191 /** @name Thread pool */
194 /** Opaque type for a thread pool */
197 /** Create a new thread pool.
198 * num_thread must nominally be >= 1 to create a real thread pool. If num_threads
199 * is negative or null, then a dummy thread pool will be created. All functions
200 * operating on the thread pool will work, but job submission will be run
201 * synchronously in the calling thread.
203 * @param num_threads the number of threads to allocate for this thread pool.
204 * @return a thread pool handle, or NULL in case of failure (can for example happen if the library
205 * is built without thread support)
209 /** User function to execute in a thread
211 * @param tls handle to thread local storage
216 /** Submit a new job to be run by one of the thread in the thread pool.
218 * by the thread pool, and run by the first thread that is no longer busy.
220 * @param tp the thread pool handle.
229 * the thread pool. The aim of this function is to avoid submitting too many
230 * jobs while the thread pool cannot cope fast enough with them, which would
234 * @param tp the thread pool handle
240 /** Return the number of threads associated with the thread pool.
242 * @param tp the thread pool handle.
243 * @return number of threads associated with the thread pool.
247 /** Destroy a thread pool.
248 * @param tp the thread pool handle.