Skip to content

Commit

Permalink
Merge 'get-restart-signal-feature' branch
Browse files Browse the repository at this point in the history
  • Loading branch information
ivmai committed Dec 20, 2011
2 parents 4a5e142 + 45aacf5 commit 9448012
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 0 deletions.
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ Jacob Navia
Jakub Jelinek
James Clark <jjc@jclark.com>
James Dominy
Jan Wielemaker <J.Wielemaker@cs.vu.nl>
Jani Kajala
Jean-Baptiste Nivois
Jean-Claude Beaudoin <jean.claude.beaudoin@gmail.com>
Expand Down
1 change: 1 addition & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
=========================

* Add GC_UNDERSCORE_STDCALL, UNICODE macro templates to configure (Win32).
* Add GC_get_thr_restart_signal API entry.
* Add GC_move_disappearing_link() API entry.
* Add TODO file.
* Add configure option to compile all library .c files into single gc.o.
Expand Down
4 changes: 4 additions & 0 deletions include/gc.h
Original file line number Diff line number Diff line change
Expand Up @@ -1082,6 +1082,10 @@ GC_API void * GC_CALL GC_call_with_stack_base(GC_stack_base_func /* fn */,
/* to suspend threads on POSIX systems. Return -1 otherwise. */
GC_API int GC_CALL GC_get_suspend_signal(void);

/* Return the signal number (constant) used by the garbage collector */
/* to restart (resume) threads on POSIX systems. Return -1 otherwise. */
GC_API int GC_CALL GC_get_thr_restart_signal(void);

/* Explicitly enable GC_register_my_thread() invocation. */
/* Done implicitly if a GC thread-creation function is called (or */
/* implicit thread registration is activated). Otherwise, it must */
Expand Down
7 changes: 7 additions & 0 deletions misc.c
Original file line number Diff line number Diff line change
Expand Up @@ -467,6 +467,13 @@ GC_API void GC_CALL GC_get_heap_usage_safe(GC_word *pheap_size,
return -1;
# endif
}

# if defined(GC_DARWIN_THREADS) || defined(GC_WIN32_THREADS)
GC_API int GC_CALL GC_get_thr_restart_signal(void)
{
return -1; /* GC does not use signals to restart threads. */
}
# endif
#endif /* THREADS */

#ifdef GC_READ_ENV_FILE
Expand Down
9 changes: 9 additions & 0 deletions pthread_stop_world.c
Original file line number Diff line number Diff line change
Expand Up @@ -872,4 +872,13 @@ GC_INNER void GC_stop_init(void)
# endif /* !GC_OPENBSD_THREADS && !NACL */
}

GC_API int GC_CALL GC_get_thr_restart_signal(void)
{
# if !defined(GC_OPENBSD_THREADS) && !defined(NACL)
return SIG_THR_RESTART;
# else
return -1;
# endif
}

#endif

0 comments on commit 9448012

Please sign in to comment.