projects
/
tinc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Use threads for TCP connections.
[tinc]
/
src
/
threads.h
diff --git
a/src/threads.h
b/src/threads.h
index
d2ef4a6
..
d55e59e
100644
(file)
--- a/
src/threads.h
+++ b/
src/threads.h
@@
-32,6
+32,7
@@
static inline bool thread_create(thread_t *tid, void (*func)(void *), void *arg)
return !pthread_create(tid, NULL, (void *(*)(void *))func, arg);
}
static inline void thread_destroy(thread_t *tid) {
+ pthread_cancel(*tid);
pthread_join(*tid, NULL);
}
static inline void mutex_create(mutex_t *mutex) {