Changeset 8387
- Timestamp:
- Feb 1, 2008, 4:13:18 AM (17 years ago)
- Location:
- trunk/source/lisp-kernel
- Files:
-
- 4 edited
-
Threads.h (modified) (2 diffs)
-
lisp.h (modified) (3 diffs)
-
pmcl-kernel.c (modified) (8 diffs)
-
win64/Makefile (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/lisp-kernel/Threads.h
r7828 r8387 17 17 #include <stdlib.h> 18 18 #include <unistd.h> 19 #ifndef WINDOWS 19 20 #include <sys/mman.h> 21 #endif 20 22 #include <stdio.h> 23 #ifndef WINDOWS 21 24 #include <pthread.h> 25 #endif 22 26 #include <errno.h> 23 27 #include <limits.h> 28 24 29 #undef USE_MACH_SEMAPHORES 25 #undef USE_POSIX_SEMAPHORES 30 #define USE_POSIX_SEMAPHORES 31 #undef USE_WINDOWS_SEMAPHORES 32 26 33 #ifdef DARWIN 27 34 #define USE_MACH_SEMAPHORES 1 28 #endif 29 #ifndef USE_MACH_SEMAPHORES 30 #define USE_POSIX_SEMAPHORES 35 #undef USE_POSIX_SEMAPHORES 36 #endif 37 #ifdef WINDOWS 38 #define USE_WINDOWS_SEMPAHORES 1 39 #undef USE_POSIX_SEMAPHORES 40 #endif 41 42 #ifdef USE_POSIX_SEMAPHORES 31 43 #include <semaphore.h> 32 44 #endif 45 46 33 47 #ifdef USE_MACH_SEMAPHORES 34 48 /* We have to use Mach semaphores, even if we're otherwise … … 70 84 #define TCR_FROM_TSD(tsd) ((TCR *)((natural)(tsd)-TCR_BIAS)) 71 85 86 #ifdef USE_WINDOWS_SEMAPHORES 87 88 typedef void *sem_t; 89 90 #endif 72 91 #ifdef USE_POSIX_SEMAPHORES 73 92 typedef sem_t * SEMAPHORE; -
trunk/source/lisp-kernel/lisp.h
r6900 r8387 37 37 extern int page_size, log2_page_size; 38 38 39 static inline unsigned long40 _align_to_power_of_2( unsigned longn, unsigned power)39 static inline natural 40 _align_to_power_of_2(natural n, unsigned power) 41 41 { 42 unsigned longalign = (1<<power) -1;42 natural align = (1<<power) -1; 43 43 44 44 return (n+align) & ~align; 45 45 } 46 46 47 #define align_to_power_of_2(n,p) _align_to_power_of_2((( unsigned long)(n)),p)47 #define align_to_power_of_2(n,p) _align_to_power_of_2(((natural)(n)),p) 48 48 49 49 static inline unsigned long … … 73 73 #define PLATFORM_OS_DARWIN 3 74 74 #define PLATFORM_OS_FREEBSD 4 75 #define PLATFORM_OS_WINDOWS 6 75 76 76 77 #ifdef LINUX … … 88 89 #ifdef SOLARIS 89 90 #define PLATFORM_OS PLATFORM_OS_SOLARIS 91 #endif 92 93 #ifdef WINDOWS 94 #define PLATFORM_OS PLATFORM_OS_WINDOWS 90 95 #endif 91 96 -
trunk/source/lisp-kernel/pmcl-kernel.c
r8246 r8387 31 31 #include <stdio.h> 32 32 #include <stdlib.h> 33 #ifndef WINDOWS 33 34 #include <sys/mman.h> 35 #endif 34 36 #include <fcntl.h> 35 37 #include <signal.h> 36 38 #include <unistd.h> 37 39 #include <errno.h> 40 #ifndef WINDOWS 38 41 #include <sys/utsname.h> 42 #endif 39 43 40 44 #ifdef LINUX … … 106 110 107 111 #include <ctype.h> 112 #ifndef WINDOWS 108 113 #include <sys/select.h> 114 #endif 109 115 #include "Threads.h" 110 116 … … 141 147 { 142 148 void * cache_start = (void *) p; 143 unsigned long ncacheflush = (unsigned long) q - (unsigned long) p;149 natural ncacheflush = (natural) q - (natural) p; 144 150 145 151 xMakeDataExecutable(cache_start, ncacheflush); … … 149 155 ensure_stack_limit(size_t stack_size) 150 156 { 157 #ifdef WINDOWS 158 #else 151 159 struct rlimit limits; 152 160 rlim_t cur_stack_limit, max_stack_limit; … … 168 176 } 169 177 } 178 #endif 170 179 return stack_size; 171 180 } … … 189 198 void *allocate_stack(unsigned); 190 199 void free_stack(void *); 191 unsignedsize = useable+softsize+hardsize;192 unsignedoverhead;200 natural size = useable+softsize+hardsize; 201 natural overhead; 193 202 BytePtr base, softlimit, hardlimit; 194 203 OSErr err; … … 1631 1640 1632 1641 #ifndef DARWIN 1642 #ifdef WINDOWS 1643 #else 1633 1644 void * 1634 1645 xGetSharedLibrary(char *path, int mode) … … 1636 1647 return dlopen(path, mode); 1637 1648 } 1649 #else 1638 1650 #else 1639 1651 void * -
trunk/source/lisp-kernel/win64/Makefile
r7827 r8387 1 1 # 2 # Copyright (C) 200 5Clozure Associates2 # Copyright (C) 2007 Clozure Associates 3 3 # This file is part of OpenMCL. 4 4 # … … 17 17 VPATH = ../ 18 18 RM = /bin/rm 19 CC = x86_64-pc-mingw32-gcc 20 AS = x86_64-pc-mingw32-as 19 # gcc64, as64: until there's a real win64 gcc, assume that gcc and gas 20 # are installed under these names 21 CC = gcc64 22 AS = as64 21 23 M4 = m4 24 LD = ld 22 25 ASFLAGS = --64 23 26 M4FLAGS = -DWIN64 -DWINDOWS -DX86 -DX8664 -DHAVE_TLS -DEMUTLS 24 27 CDEFINES = -DWIN64 -DWINDOWS -D_REENTRANT -DX86 -DX8664 -D_GNU_SOURCE -DHAVE_TLS -DEMUTLS #-DDISABLE_EGC 25 CDEBUG = -g 28 CDEBUG = -gcoff 26 29 COPT = -O2 27 30 … … 40 43 $(M4) $(M4FLAGS) -I../ $< | $(AS) $(ASFLAGS) -o $@ 41 44 .c.o: 42 $(CC) -c $< $(CDEFINES) $(CDEBUG) $(COPT) - m64 -o $@45 $(CC) -c $< $(CDEFINES) $(CDEBUG) $(COPT) -fno-leading-underscore -m64 -o $@ 43 46 44 47 SPOBJ = pad.o x86-spjump64.o x86-spentry64.o x86-subprims64.o
Note:
See TracChangeset
for help on using the changeset viewer.
