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/t/thread_pool_limits.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/t/thread_pool_limits.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/t/thread_pool_limits.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/t/thread_pool_limits.html on line 8
Convenience wrapper function for thread_pool_control()
#include <sys/iofunc.h>
#include <sys/dispatch.h>
int thread_pool_limits( thread_pool_t * pool,
int lowater,
int hiwater,
int maximum,
int increment,
unsigned flags );
- pool
- A thread pool handle that was returned by
thread_pool_create().
- lowater
- The minimum number of threads that the pool should keep in the blocked
state (i.e. threads that are ready to do work), or a negative number if
you don't want to change the current value.
- hiwater
- The maximum number of threads that the pool should keep in the blocked
state, or a negative number if you don't want to change the current value.
- maximum
- The maximum number of threads that the pool can create, or a negative
number if you don't want to change the current value.
- increment
- The number of new threads created at one time, or a negative number
if you don't want to change the current value.
- flags
- The only flag that's accepted is
THREAD_POOL_CONTROL_NONBLOCK.
For more information, see the documentation for
thread_pool_control().
libc
Use the -l c option to
qcc
to link against this library.
This library is usually included automatically.
The thread_pool_limits() function is a wrapper function for
thread_pool_control().
If the value of lowater, hiwater, maximum or increment is ≥0
then that value is adjusted in the thread pool according to the handle pool.
If you don't set THREAD_POOL_CONTROL_NONBLOCK,
the upper and lower bounds for waiting are:
- lower = (lowater != -1) : lowater ? 0;
- upper = (maximum != -1) : maximum ? USHRT_MAX;
|
Having several threads call this function with the same thread pool handle isn't recommended. |
-1 if an error occurs (errno is set).
QNX Neutrino
Safety: | |
Cancellation point |
Yes |
Interrupt handler |
No |
Signal handler |
No |
Thread |
Yes |
thread_pool_control(),
thread_pool_create(),
thread_pool_destroy(),
thread_pool_start()
Processes and Threads
chapter of Getting Started with QNX Neutrino
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/t/thread_pool_limits.html on line 167
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/t/thread_pool_limits.html on line 167