1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-09 00:00:00 +01:00

changed thread id names

git-svn-id: https://zerberus.eonerc.rwth-aachen.de:8443/svn/s2ss/trunk@221 8ec27952-4edc-4aab-86aa-e87bb2611832
This commit is contained in:
Steffen Vogel 2014-09-09 09:03:01 +00:00
parent 8fcdcc2c01
commit a325c83f4f
2 changed files with 8 additions and 8 deletions

View file

@ -53,9 +53,9 @@ struct path
unsigned long skipped;
/** The thread id for this path */
pthread_t tid;
pthread_t recv_tid;
/** A second thread id for fixed rate sending thread */
pthread_t tid2;
pthread_t sent_tid;
/** A pointer to the libconfig object which instantiated this path */
config_setting_t *cfg;

View file

@ -132,19 +132,19 @@ int path_start(struct path *p)
{
/* At fixed rate mode, we start another thread for sending */
if (p->rate)
pthread_create(&p->tid2, NULL, &path_send, (void *) p);
pthread_create(&p->sent_tid, NULL, &path_send, (void *) p);
return pthread_create(&p->tid, NULL, &path_run, (void *) p);
return pthread_create(&p->recv_tid, NULL, &path_run, (void *) p);
}
int path_stop(struct path *p)
{
pthread_cancel(p->tid);
pthread_join(p->tid, NULL);
pthread_cancel(p->recv_tid);
pthread_join(p->recv_tid, NULL);
if (p->rate) {
pthread_cancel(p->tid2);
pthread_join(p->tid2, NULL);
pthread_cancel(p->sent_tid);
pthread_join(p->sent_tid, NULL);
}
return 0;