From ab542dcf4e6bc5b6bd6490586fdb05a6f359f87c Mon Sep 17 00:00:00 2001 From: jgarcia Date: Tue, 24 Oct 2006 12:33:24 +0000 Subject: [PATCH] Remove dependency on lwp.h and add header pthread.h for several symbols (PTHREAD_MUTEX... etc) required in packages.d and threads.d --- src/c/Makefile.in | 3 +-- src/h/internal.h | 5 +++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/c/Makefile.in b/src/c/Makefile.in index 7e34f8093..5b9fb5a8e 100644 --- a/src/c/Makefile.in +++ b/src/c/Makefile.in @@ -35,8 +35,7 @@ HDIR = ../ecl HFILES = ../ecl/config.h $(HDIR)/ecl.h $(HDIR)/ecl-cmp.h\ $(HDIR)/object.h $(HDIR)/cs.h $(HDIR)/stacks.h\ $(HDIR)/external.h $(HDIR)/eval.h\ - $(HDIR)/number.h $(HDIR)/page.h $(HDIR)/unify.h\ - $(HDIR)/lwp.h + $(HDIR)/number.h $(HDIR)/page.h $(HDIR)/unify.h OBJS = main.o symbol.o package.o list.o\ apply.o eval.o interpreter.o compiler.o disassembler.o \ instance.o gfun.o reference.o character.o\ diff --git a/src/h/internal.h b/src/h/internal.h index 73a59a527..eaa6a3df8 100644 --- a/src/h/internal.h +++ b/src/h/internal.h @@ -191,6 +191,11 @@ extern void cl_write_object(cl_object x, cl_object stream); # define pthread_mutex_lock(x) \ (WaitForSingleObject(*(HANDLE*)(x), INFINITE) != WAIT_OBJECT_0) # define pthread_mutex_unlock(x) (ReleaseMutex(*(HANDLE*)(x)) == 0) +# else +# include +# if defined(__APPLE__) || defined(freebsd) +# define PTHREAD_MUTEX_ERROR_CHECK_NP PTHREAD_MUTEX_ERROR_CHECK_NP +# endif # endif # define HASH_TABLE_LOCK(h) if ((h)->hash.lockable) if (pthread_mutex_lock(&(h)->hash.lock)) internal_error("") # define PACKAGE_LOCK(p) if (pthread_mutex_lock(&(p)->pack.lock)) internal_error("")