mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
rtp: remove wrapper function to start thread
This commit is contained in:
parent
7c00e054db
commit
e9c3e61084
1 changed files with 3 additions and 6 deletions
|
@ -465,12 +465,7 @@ int rtp_stop(struct node *n)
|
|||
}
|
||||
|
||||
return io_destroy(&r->io);
|
||||
}
|
||||
|
||||
static void * th_func(void *arg)
|
||||
{
|
||||
re_main(NULL);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void stop_handler(int sig, siginfo_t *si, void *ctx)
|
||||
|
@ -478,6 +473,8 @@ static void stop_handler(int sig, siginfo_t *si, void *ctx)
|
|||
re_cancel();
|
||||
}
|
||||
|
||||
typedef void *(*pthread_start_routine)(void *);
|
||||
|
||||
int rtp_type_start(struct super_node *sn)
|
||||
{
|
||||
int ret;
|
||||
|
@ -490,7 +487,7 @@ int rtp_type_start(struct super_node *sn)
|
|||
}
|
||||
|
||||
/* Add worker thread */
|
||||
ret = pthread_create(&re_pthread, NULL, th_func, NULL);
|
||||
ret = pthread_create(&re_pthread, NULL, (pthread_start_routine) re_main, NULL);
|
||||
if (ret) {
|
||||
warning("Error creating rtp node type pthread");
|
||||
return ret;
|
||||
|
|
Loading…
Add table
Reference in a new issue