diff options
author | Hans Mulder <hansmu@xs4all.nl> | 1998-11-07 23:06:20 +0100 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 1998-11-07 21:14:18 +0000 |
commit | 3541dd58afee4802e6d8771e6ed02e20cc107e31 (patch) | |
tree | bc1451cb3edc634038097a76d378eb01f690f511 /perl.h | |
parent | acc3bde0c1cc7602c674eca404394646c15d87f1 (diff) | |
download | perl-3541dd58afee4802e6d8771e6ed02e20cc107e31.tar.gz |
Finalize the Mach CThreads support.
To: Gurusamy Sarathy <gsar@engin.umich.edu>
Cc: jhi@iki.fi, perl5-porters@perl.org
Subject: [PATCH] Re: Not OK: perl 5.00553 on OPENSTEP-Mach 4_1 (UNINSTALLED)
Message-Id: <9811072105.AA07794@icgned.icgroup.nl>
p4raw-id: //depot/cfgperl@2211
Diffstat (limited to 'perl.h')
-rw-r--r-- | perl.h | 18 |
1 files changed, 16 insertions, 2 deletions
@@ -1816,8 +1816,22 @@ typedef Sighandler_t Sigsave_t; #endif #ifdef MYMALLOC -# define MALLOC_INIT MUTEX_INIT(&PL_malloc_mutex) -# define MALLOC_TERM MUTEX_DESTROY(&PL_malloc_mutex) +# ifdef I_MACH_CTHREADS +# define MALLOC_INIT \ + STMT_START { \ + PL_malloc_mutex = NULL; \ + MUTEX_INIT(&PL_malloc_mutex); \ + } STMT_END +# define MALLOC_TERM \ + STMT_START { \ + perl_mutex tmp = PL_malloc_mutex; \ + PL_malloc_mutex = NULL; \ + MUTEX_DESTROY(&tmp); \ + } STMT_END +# else +# define MALLOC_INIT MUTEX_INIT(&PL_malloc_mutex) +# define MALLOC_TERM MUTEX_DESTROY(&PL_malloc_mutex) +# endif #else # define MALLOC_INIT # define MALLOC_TERM |