tmp = subscriber_threads + subscriber_threads_num;
memset (tmp, 0, sizeof (*tmp));
- status = pthread_create (tmp, /* attr = */ NULL,
+ status = plugin_thread_create (tmp, /* attr = */ NULL,
camqp_subscribe_thread, conf);
if (status != 0)
{
if (listen_thread_init != 0)
return (-1);
- status = pthread_create (&listen_thread, NULL, dns_child_loop,
+ status = plugin_thread_create (&listen_thread, NULL, dns_child_loop,
(void *) 0);
if (status != 0)
{
collectors[i] = (collector_t *)smalloc (sizeof (collector_t));
collectors[i]->socket = NULL;
- if (0 != (err = pthread_create (&collectors[i]->thread, &ptattr,
- collect, collectors[i]))) {
+ if (0 != (err = plugin_thread_create (&collectors[i]->thread,
+ &ptattr, collect, collectors[i]))) {
char errbuf[1024];
log_err ("pthread_create() failed: %s",
sstrerror (errno, errbuf, sizeof (errbuf)));
{
int err = 0;
- if (0 != (err = pthread_create (&connector, NULL,
+ if (0 != (err = plugin_thread_create (&connector, NULL,
open_connection, NULL))) {
char errbuf[1024];
disabled = 1;
pthread_attr_init (&attr);
pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED);
- pthread_create (&t, &attr, exec_read_one, (void *) pl);
+ plugin_thread_create (&t, &attr, exec_read_one, (void *) pl);
} /* for (pl) */
return (0);
pthread_attr_init (&attr);
pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED);
- pthread_create (&t, &attr, exec_notification_one, (void *) pln);
+ plugin_thread_create (&t, &attr, exec_notification_one, (void *) pln);
} /* for (pl) */
return (0);
mc_receive_thread_loop = 1;
- status = pthread_create (&mc_receive_thread_id, /* attr = */ NULL,
+ status = plugin_thread_create (&mc_receive_thread_id, /* attr = */ NULL,
mc_receive_thread, /* args = */ NULL);
if (status != 0)
{
c_ipmi_active = 1;
- status = pthread_create (&thread_id, /* attr = */ NULL, thread_main,
+ status = plugin_thread_create (&thread_id, /* attr = */ NULL, thread_main,
/* user data = */ NULL);
if (status != 0)
{
if (dispatch_thread_running == 0)
{
int status;
- status = pthread_create (&dispatch_thread_id,
+ status = plugin_thread_create (&dispatch_thread_id,
NULL /* no attributes */,
dispatch_thread,
NULL /* no argument */);
if (receive_thread_running == 0)
{
int status;
- status = pthread_create (&receive_thread_id,
+ status = plugin_thread_create (&receive_thread_id,
NULL /* no attributes */,
receive_thread,
NULL /* no argument */);
if (collector_thread_running)
return (0);
- status = pthread_create (&collector_thread_id,
+ status = plugin_thread_create (&collector_thread_id,
/* attrs = */ NULL,
collector_thread,
/* args = */ NULL);
ping_thread_loop = 1;
ping_thread_error = 0;
- status = pthread_create (&ping_thread_id, /* attr = */ NULL,
+ status = plugin_thread_create (&ping_thread_id, /* attr = */ NULL,
ping_thread, /* arg = */ (void *) 0);
if (status != 0)
{
pthread_sigmask(SIG_BLOCK, &sigset, NULL);
state = PyEval_SaveThread();
if (do_interactive) {
- if (pthread_create(&thread, NULL, cpy_interactive, NULL)) {
+ if (plugin_thread_create(&thread, NULL, cpy_interactive, NULL)) {
ERROR("python: Error creating thread for interactive interpreter.");
}
}
pthread_mutex_unlock (&cache_lock);
- status = pthread_create (&queue_thread, /* attr = */ NULL,
+ status = plugin_thread_create (&queue_thread, /* attr = */ NULL,
rrd_queue_thread, /* args = */ NULL);
if (status != 0)
{
pthread_attr_init (&th_attr);
pthread_attr_setdetachstate (&th_attr, PTHREAD_CREATE_DETACHED);
- status = pthread_create (&th, &th_attr, us_handle_client, (void *) remote_fd);
+ status = plugin_thread_create (&th, &th_attr,
+ us_handle_client, (void *) remote_fd);
if (status != 0)
{
char errbuf[1024];
loop = 1;
- status = pthread_create (&listen_thread, NULL, us_server_thread, NULL);
+ status = plugin_thread_create (&listen_thread, NULL,
+ us_server_thread, NULL);
if (status != 0)
{
char errbuf[1024];