diff options
author | Zefram <zefram@fysh.org> | 2012-02-11 11:05:51 +0000 |
---|---|---|
committer | Zefram <zefram@fysh.org> | 2012-02-11 11:05:51 +0000 |
commit | e8570548af49b057631f1011e4b19c8c4a1342dd (patch) | |
tree | 250e8d72a232028036906cd58757ad4f86da886c /op.h | |
parent | 96a6e6fa4fb95146d6ef6deb911128ac757e1550 (diff) | |
download | perl-e8570548af49b057631f1011e4b19c8c4a1342dd.tar.gz |
add wrap_op_checker() API function
This function provides a convenient and thread-safe way for modules to
hook op checking.
Diffstat (limited to 'op.h')
-rw-r--r-- | op.h | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -1000,6 +1000,22 @@ struct token { */ /* +=head1 Hook manipulation +*/ + +#ifdef USE_ITHREADS +# define OP_CHECK_MUTEX_INIT MUTEX_INIT(&PL_check_mutex) +# define OP_CHECK_MUTEX_LOCK MUTEX_LOCK(&PL_check_mutex) +# define OP_CHECK_MUTEX_UNLOCK MUTEX_UNLOCK(&PL_check_mutex) +# define OP_CHECK_MUTEX_TERM MUTEX_DESTROY(&PL_check_mutex) +#else +# define OP_CHECK_MUTEX_INIT NOOP +# define OP_CHECK_MUTEX_LOCK NOOP +# define OP_CHECK_MUTEX_UNLOCK NOOP +# define OP_CHECK_MUTEX_TERM NOOP +#endif + +/* * Local variables: * c-indentation-style: bsd * c-basic-offset: 4 |