mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-02-28 01:30:32 -08:00
Added support for threads in FreeBSD
This commit is contained in:
parent
26d3cad037
commit
644859e164
5 changed files with 10 additions and 7 deletions
1
src/aclocal.m4
vendored
1
src/aclocal.m4
vendored
|
|
@ -198,6 +198,7 @@ case "${host_os}" in
|
|||
;;
|
||||
freebsd*)
|
||||
thehost='freebsd'
|
||||
THREAD_LIBS='-lpthread'
|
||||
SHARED_LDFLAGS="-shared ${LDFLAGS}"
|
||||
BUNDLE_LDFLAGS="-shared ${LDFLAGS}"
|
||||
LDRPATH="-Wl,--rpath,~A"
|
||||
|
|
|
|||
|
|
@ -293,11 +293,7 @@ mp_process_run_function(cl_narg narg, cl_object name, cl_object function, ...)
|
|||
cl_object output;
|
||||
@
|
||||
pthread_mutexattr_init(&attr);
|
||||
#if defined(__APPLE__)
|
||||
pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
|
||||
#else
|
||||
pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE_NP);
|
||||
#endif
|
||||
output = cl_alloc_object(t_lock);
|
||||
output->lock.name = name;
|
||||
pthread_mutex_init(&output->lock.mutex, &attr);
|
||||
|
|
|
|||
1
src/configure
vendored
1
src/configure
vendored
|
|
@ -3512,6 +3512,7 @@ case "${host_os}" in
|
|||
;;
|
||||
freebsd*)
|
||||
thehost='freebsd'
|
||||
THREAD_LIBS='-lpthread'
|
||||
SHARED_LDFLAGS="-shared ${LDFLAGS}"
|
||||
BUNDLE_LDFLAGS="-shared ${LDFLAGS}"
|
||||
LDRPATH="-Wl,--rpath,~A"
|
||||
|
|
|
|||
|
|
@ -279,3 +279,11 @@ typedef unsigned @CL_FIXNUM_TYPE@ cl_hashkey;
|
|||
#define ECL_ARCHITECTURE "@ARCHITECTURE@"
|
||||
|
||||
#include "@ECL_FPE_CODE@"
|
||||
|
||||
#if defined(ECL_THREADS)
|
||||
# if defined(darwin) || defined(freebsd)
|
||||
# define PTHREAD_MUTEX_ERRORCHECK_NP PTHREAD_MUTEX_ERRORCHECK
|
||||
# define PTHREAD_MUTEX_RECURSIVE_NP PTHREAD_MUTEX_RECURSIVE
|
||||
# define PTHREAD_MUTEX_NORMAL_NP PTHREAD_MUTEX_NORMAL
|
||||
# endif
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -48,9 +48,6 @@ typedef unsigned short uint16_t;
|
|||
# endif
|
||||
# else
|
||||
# include <pthread.h>
|
||||
# if defined(__APPLE__) || defined(freebsd)
|
||||
# define PTHREAD_MUTEX_ERROR_CHECK_NP PTHREAD_MUTEX_ERROR_CHECK_NP
|
||||
# endif
|
||||
# endif
|
||||
# define start_critical_section()
|
||||
# define end_critical_section()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue