projects
/
mono.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
aa53562
)
Avoid calling sem_post on a uninitialized semaphore during thread attach, it works...
author
Zoltan Varga
<vargaz@gmail.com>
Sun, 17 Oct 2010 23:55:41 +0000
(
01:55
+0200)
committer
Zoltan Varga
<vargaz@gmail.com>
Sun, 17 Oct 2010 23:55:41 +0000
(
01:55
+0200)
libgc/pthread_support.c
patch
|
blob
|
history
diff --git
a/libgc/pthread_support.c
b/libgc/pthread_support.c
index f70d4f6e731a87cee6bc9dcf3f00d6b7b22b2464..2d54a513d017a742472cdb1c77a86f342047369d 100644
(file)
--- a/
libgc/pthread_support.c
+++ b/
libgc/pthread_support.c
@@
-1344,7
+1344,8
@@
void * GC_start_routine_head(void * arg, void *base_addr,
if (start) *start = si -> start_routine;
if (start_arg) *start_arg = si -> arg;
- sem_post(&(si -> registered)); /* Last action on si. */
+ if (!(si->flags & FOREIGN_THREAD))
+ sem_post(&(si -> registered)); /* Last action on si. */
/* OK to deallocate. */
# if defined(THREAD_LOCAL_ALLOC) && !defined(DBG_HDRS_ALL)
LOCK();