This is a live mirror of the Perl 5 development currently hosted at
https://github.com/perl/perl5
https://perl5.git.perl.org
/
perl5.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
signatures: make param and optional param count IV
[perl5.git]
/
thread.h
diff --git
a/thread.h
b/thread.h
index
8c8e23e
..
9958a5b
100644
(file)
--- a/
thread.h
+++ b/
thread.h
@@
-40,9
+40,6
@@
# define NEED_PTHREAD_INIT
# define PTHREAD_CREATE_JOINABLE (1)
# endif
# define NEED_PTHREAD_INIT
# define PTHREAD_CREATE_JOINABLE (1)
# endif
-# ifdef __OPEN_VM
-# define pthread_addr_t void *
-# endif
# ifdef OEMVS
# define pthread_addr_t void *
# define pthread_create(t,a,s,d) pthread_create(t,&(a),s,d)
# ifdef OEMVS
# define pthread_addr_t void *
# define pthread_create(t,a,s,d) pthread_create(t,&(a),s,d)
@@
-65,7
+62,7
@@
# define pthread_mutexattr_init(a) pthread_mutexattr_create(a)
# define pthread_mutexattr_settype(a,t) pthread_mutexattr_setkind_np(a,t)
# endif
# define pthread_mutexattr_init(a) pthread_mutexattr_create(a)
# define pthread_mutexattr_settype(a,t) pthread_mutexattr_setkind_np(a,t)
# endif
-# if defined(DJGPP) || defined(
__OPEN_VM) || defined(
OEMVS)
+# if defined(DJGPP) || defined(OEMVS)
# define PTHREAD_ATTR_SETDETACHSTATE(a,s) pthread_attr_setdetachstate(a,&(s))
# define YIELD pthread_yield(NULL)
# endif
# define PTHREAD_ATTR_SETDETACHSTATE(a,s) pthread_attr_setdetachstate(a,&(s))
# define YIELD pthread_yield(NULL)
# endif
@@
-94,10
+91,6
@@
# endif
#endif
# endif
#endif
-#ifdef DGUX
-# define THREAD_CREATE_NEEDS_STACK (32*1024)
-#endif
-
#ifdef __VMS
/* Default is 1024 on VAX, 8192 otherwise */
# ifdef __ia64
#ifdef __VMS
/* Default is 1024 on VAX, 8192 otherwise */
# ifdef __ia64
@@
-215,10
+208,18
@@
} STMT_END
# endif
} STMT_END
# endif
+# ifdef PERL_TSA_ACTIVE
+# define perl_pthread_mutex_lock(m) perl_tsa_mutex_lock(m)
+# define perl_pthread_mutex_unlock(m) perl_tsa_mutex_unlock(m)
+# else
+# define perl_pthread_mutex_lock(m) pthread_mutex_lock(m)
+# define perl_pthread_mutex_unlock(m) pthread_mutex_unlock(m)
+# endif
+
# define MUTEX_LOCK(m) \
STMT_START { \
int _eC_; \
# define MUTEX_LOCK(m) \
STMT_START { \
int _eC_; \
- if ((_eC_ = p
thread_mutex_lock((m))))
\
+ if ((_eC_ = p
erl_pthread_mutex_lock((m))))
\
Perl_croak_nocontext("panic: MUTEX_LOCK (%d) [%s:%d]", \
_eC_, __FILE__, __LINE__); \
} STMT_END
Perl_croak_nocontext("panic: MUTEX_LOCK (%d) [%s:%d]", \
_eC_, __FILE__, __LINE__); \
} STMT_END
@@
-226,7
+227,7
@@
# define MUTEX_UNLOCK(m) \
STMT_START { \
int _eC_; \
# define MUTEX_UNLOCK(m) \
STMT_START { \
int _eC_; \
- if ((_eC_ = p
thread_mutex_unlock((m))))
\
+ if ((_eC_ = p
erl_pthread_mutex_unlock((m))))
\
Perl_croak_nocontext("panic: MUTEX_UNLOCK (%d) [%s:%d]", \
_eC_, __FILE__, __LINE__); \
} STMT_END
Perl_croak_nocontext("panic: MUTEX_UNLOCK (%d) [%s:%d]", \
_eC_, __FILE__, __LINE__); \
} STMT_END
@@
-343,7
+344,7
@@
# define ALLOC_THREAD_KEY \
STMT_START { \
if (pthread_key_create(&PL_thr_key, 0)) { \
# define ALLOC_THREAD_KEY \
STMT_START { \
if (pthread_key_create(&PL_thr_key, 0)) { \
-
write(2, STR_WITH_LEN("panic: pthread_key_create failed\n"
)); \
+
PERL_UNUSED_RESULT(write(2, STR_WITH_LEN("panic: pthread_key_create failed\n")
)); \
exit(1); \
} \
} STMT_END
exit(1); \
} \
} STMT_END
@@
-438,11
+439,5
@@
#endif
/*
#endif
/*
- * Local variables:
- * c-indentation-style: bsd
- * c-basic-offset: 4
- * indent-tabs-mode: nil
- * End:
- *
* ex: set ts=8 sts=4 sw=4 et:
*/
* ex: set ts=8 sts=4 sw=4 et:
*/