Changeset 14295
- Timestamp:
- Sep 22, 2010, 1:10:30 AM (10 years ago)
- Location:
- trunk/source/lisp-kernel
- Files:
-
- 20 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/lisp-kernel/area.h
r14119 r14295 105 105 void untenure_from_area(area *); 106 106 107 Boolean grow_dynamic_area(natural); 108 Boolean shrink_dynamic_area(natural); 109 107 110 /* serialize add_area/remove_area, and also the tcr queue */ 108 111 void *tcr_area_lock; -
trunk/source/lisp-kernel/bits.h
r14119 r14295 115 115 BITWvar = (*BITPvar << BITIDXvar) >> BITIDXvar; } 116 116 117 #if def __GNUC__117 #if defined(__GNUC__) && !defined(__clang__) 118 118 static __inline__ natural 119 119 current_stack_pointer(void) __attribute__((always_inline)); -
trunk/source/lisp-kernel/gc-common.c
r14273 r14295 742 742 void *p, *next, *addr; 743 743 struct xmacptr *x, *xnext; 744 int i,flags;744 int flags; 745 745 xmacptr_dispose_fn dfn; 746 746 … … 752 752 753 753 for (x = user_postGC_macptrs; x; x = xnext) { 754 xnext = (xmacptr *) (x->class); ;754 xnext = (xmacptr *) (x->class); 755 755 flags = x->flags - xmacptr_flag_user_first; 756 756 dfn = xmacptr_dispose_functions[flags]; … … 1028 1028 LispObj *ptr = &(lisp_global(WEAKVLL)), this, new, old; 1029 1029 1030 while ( this = *ptr) {1030 while ((this = *ptr)) { 1031 1031 old = this + fulltag_misc; 1032 1032 new = node_forwarding_address(old); … … 1101 1101 } 1102 1102 xprev = &user_postGC_macptrs; 1103 while ( xnext = *xprev) {1103 while ((xnext = *xprev)) { 1104 1104 xnew = (struct xmacptr *)locative_forwarding_address((LispObj)xnext); 1105 1105 if (xnew != xnext) { … … 1114 1114 { 1115 1115 bitvector refbits = a->refbits; 1116 LispObj *p = (LispObj *) a->low, *p0 = p, x1, x2, new; 1116 LispObj *p = (LispObj *) a->low, x1, x2, new; 1117 #ifdef ARM 1118 LispObj *p0 = p; 1119 #endif 1117 1120 natural bits, bitidx, *bitsp, nextbit, diff, memo_dnode = 0, hash_dnode_limit = 0; 1118 1121 int tag_x1; -
trunk/source/lisp-kernel/gc.h
r14119 r14295 81 81 LispObj node_forwarding_address(LispObj); 82 82 void forward_range(LispObj *, LispObj *); 83 void forward_tcr_xframes(TCR *); 83 84 void note_memoized_references(ExceptionInformation *,LogicalAddress, LogicalAddress, BytePtr *, BytePtr *); 84 85 void gc(TCR *, signed_natural); -
trunk/source/lisp-kernel/image.c
r14207 r14295 27 27 #include <stdio.h> 28 28 #include <limits.h> 29 29 #include <time.h> 30 30 31 31 -
trunk/source/lisp-kernel/image.h
r13279 r14295 87 87 load_openmcl_image(int, openmcl_image_file_header*); 88 88 89 Boolean find_openmcl_image_file_header(int fd, openmcl_image_file_header *h); 89 90 90 91 -
trunk/source/lisp-kernel/lisp-debug.c
r14292 r14295 640 640 debug_memory_areas(ExceptionInformation *xp, siginfo_t *info, int arg) 641 641 { 642 int i;643 642 area *a, *header = all_areas; 644 643 char label[100]; … … 815 814 { 816 815 char s[32], *res, *endptr; 817 int n;818 816 natural val; 819 817 … … 1307 1305 } 1308 1306 1307 void 1309 1308 debug_identify_function(ExceptionInformation *xp, siginfo_t *info) 1310 1309 { -
trunk/source/lisp-kernel/lisp-exceptions.h
r14206 r14295 108 108 Fatal(StringPtr, StringPtr); 109 109 110 void fatal_oserr(StringPtr, OSErr); 111 110 112 void 111 113 non_fatal_error( char * ); … … 143 145 #endif 144 146 147 #ifdef DARWIN 148 void darwin_exception_init(TCR *tcr); 149 void darwin_exception_cleanup(TCR *tcr); 150 #endif 151 152 void thread_signal_setup(void); 145 153 void suspend_other_threads(Boolean); 146 154 void resume_other_threads(Boolean); 147 155 void reset_lisp_process(ExceptionInformation *); 156 void terminate_lisp(void); 148 157 149 158 #endif /* __lisp_exceptions_h__ */ -
trunk/source/lisp-kernel/memory.c
r14277 r14295 47 47 } 48 48 49 void50 fatal_oserr(StringPtr param, OSErr err)51 {52 char buf[64];53 sprintf(buf," - operating system error %d.", err);54 Fatal(param, buf);55 }56 57 49 void * 58 50 lisp_malloc(size_t size) … … 114 106 } 115 107 #endif 108 116 109 117 110 … … 206 199 CommitMemory (LogicalAddress start, natural len) 207 200 { 208 LogicalAddress rc;209 201 #if DEBUG_MEMORY 210 202 fprintf(dbgout, "Committing memory at 0x" LISP ", size 0x" LISP "\n", start, len); 211 203 #endif 212 204 #ifdef WINDOWS 205 LogicalAddress rc; 206 213 207 if ((start < ((LogicalAddress)nil_value)) && 214 208 (((LogicalAddress)nil_value) < (start+len))) { … … 228 222 return true; 229 223 #else 230 int i , err;224 int i; 231 225 void *addr; 232 226 … … 504 498 natural free_space_size) 505 499 { 506 extern int page_size;507 500 area *a = active_dynamic_area; 508 BytePtr newlimit , protptr, zptr;509 int psize = page_size; 501 BytePtr newlimit; 502 510 503 if (free_space_size) { 511 504 BytePtr lowptr = a->active; … … 519 512 } 520 513 } 514 return false; 521 515 } 522 516 … … 718 712 BytePtr 719 713 curfree = a->active, 720 target_low = target->low, 721 tenured_low = tenured_area->low; 722 natural 723 dynamic_dnodes = area_dnode(curfree, a->low), 724 new_tenured_dnodes = area_dnode(curfree, tenured_area->low); 714 target_low = target->low; 715 natural new_tenured_dnodes = area_dnode(curfree, tenured_area->low); 725 716 bitvector 726 717 refbits = tenured_area->refbits, -
trunk/source/lisp-kernel/memprotect.h
r14233 r14295 76 76 int 77 77 MapFile(LogicalAddress addr, natural pos, natural nbytes, int permissions, int fd); 78 void allocation_failure(Boolean pointerp, natural size); 79 80 void protect_watched_areas(void); 81 void unprotect_watched_areas(void); 78 82 79 83 typedef enum { … … 101 105 } protected_area, *protected_area_ptr; 102 106 107 void unprotect_area(protected_area_ptr); 103 108 104 109 /* Various functions that try to respond to a protection violation */ -
trunk/source/lisp-kernel/platform-darwinx8632.h
r13952 r14295 40 40 /* xp accessors, sigreturn stuff */ 41 41 #define DARWIN_USE_PSEUDO_SIGRETURN 1 42 extern int darwin_sigreturn(ExceptionInformation *context); 42 43 #define DarwinSigReturn(context) do {\ 43 44 darwin_sigreturn(context);\ -
trunk/source/lisp-kernel/platform-darwinx8664.h
r13952 r14295 40 40 /* xp accessors, sigreturn stuff */ 41 41 #define DARWIN_USE_PSEUDO_SIGRETURN 1 42 extern int darwin_sigreturn(ExceptionInformation *context); 42 43 #define DarwinSigReturn(context) do {\ 43 44 darwin_sigreturn(context);\ -
trunk/source/lisp-kernel/pmcl-kernel.c
r14278 r14295 601 601 map_initial_reloctab(BytePtr low, BytePtr high) 602 602 { 603 natural ndnodes, reloctab_size , n;603 natural ndnodes, reloctab_size; 604 604 605 605 low_relocatable_address = low; /* will never change */ … … 857 857 fprintf(dbgout, "Fatal error: %s\n%s\n", param0, param1); 858 858 _exit(-1); 859 } 860 861 void 862 fatal_oserr(StringPtr param, OSErr err) 863 { 864 char buf[64]; 865 sprintf(buf," - operating system error %d.", err); 866 Fatal(param, buf); 859 867 } 860 868 … … 1448 1456 long got, want; 1449 1457 char *got_end,*want_end; 1450 #ifdef X86321451 extern Boolean rcontext_readonly;1452 #endif1453 1458 1454 1459 want = strtoul(min_os_version,&want_end,10); … … 1456 1461 uname(&uts); 1457 1462 got = strtoul(uts.release,&got_end,10); 1458 #ifdef X8632 1459 #ifdef FREEBSD 1463 #if defined(X8632) && defined(FREEBSD) 1460 1464 if (!strcmp(uts.machine,"amd64")) { 1465 extern Boolean rcontext_readonly; 1466 1461 1467 rcontext_readonly = true; 1462 1468 } 1463 #endif1464 1469 #endif 1465 1470 while (got == want) { … … 1652 1657 int 1653 1658 main(int argc, char *argv[] 1654 #if ndef WINDOWS1659 #if defined(PPC) && defined(LINUX) 1655 1660 , char *envp[], void *aux 1656 1661 #endif -
trunk/source/lisp-kernel/threads.h
r14280 r14295 136 136 #endif 137 137 138 void signal_semaphore(SEMAPHORE s); 139 int wait_on_semaphore(void *s, int seconds, int millis); 138 140 void sem_wait_forever(SEMAPHORE s); 139 141 … … 179 181 void *tsd_get(LispObj); 180 182 TCR *new_tcr(natural, natural); 183 void thread_init_tcr(TCR *tcr, void *stack_base, natural stack_size); 181 184 TCR *initial_thread_tcr; 182 185 … … 197 200 TCR *get_tcr(Boolean); 198 201 TCR *get_interrupt_tcr(Boolean); 202 199 203 Boolean suspend_tcr(TCR *); 200 204 Boolean resume_tcr(TCR *); 205 Boolean kill_tcr(TCR *); 206 207 int raise_thread_interrupt(TCR *target); 208 209 Boolean lisp_suspend_tcr(TCR *); 210 Boolean lisp_resume_tcr(TCR *); 211 void lisp_suspend_other_threads(void); 212 void lisp_resume_other_threads(void); 201 213 202 214 typedef struct -
trunk/source/lisp-kernel/unix-calls.c
r14281 r14295 37 37 #include <stdint.h> 38 38 #include <signal.h> 39 #include <fcntl.h> 39 40 40 41 ssize_t -
trunk/source/lisp-kernel/x86-constants32.h
r14207 r14295 382 382 #define EFL_DF 1024 383 383 #endif 384 -
trunk/source/lisp-kernel/x86-exceptions.c
r14207 r14295 581 581 unsigned allocptr_tag; 582 582 signed_natural disp; 583 Boolean notify_pending_gc = false;584 583 585 584 cur_allocptr = xpGPR(xp,Iallocptr); … … 3883 3882 LispObj *newnode = (LispObj *)untag(new); 3884 3883 area *a = area_containing((BytePtr)old); 3884 extern void update_managed_refs(area *, BytePtr, natural); 3885 3885 3886 3886 if (a && a->code == AREA_WATCHED) { -
trunk/source/lisp-kernel/x86-exceptions.h
r13638 r14295 45 45 #define XUUO_KILL 9 46 46 #define XUUO_ALLOCATE_LIST 10 47 48 int callback_to_lisp (TCR *tcr, LispObj callback_macptr, ExceptionInformation *xp, 49 natural arg1, natural arg2, natural arg3, natural arg4, 50 natural arg5); 51 47 52 48 53 void … … 97 102 extern natural get_mxcsr(); 98 103 extern void set_mxcsr(natural); 104 void enable_fp_exceptions(void); 99 105 100 106 #ifdef X8632 … … 107 113 #endif 108 114 115 void callback_for_gc_notification(ExceptionInformation *xp, TCR *tcr); 116 109 117 #endif /* X86_EXCEPTIONS_H */ 110 118 -
trunk/source/lisp-kernel/x86-gc.c
r14197 r14295 28 28 29 29 #ifdef X8632 30 inlinenatural30 natural 31 31 imm_word_count(LispObj fn) 32 32 { … … 251 251 check_xp(ExceptionInformation *xp, natural node_regs_mask) 252 252 { 253 natural *regs = (natural *) xpGPRvector(xp) , dnode;253 natural *regs = (natural *) xpGPRvector(xp); 254 254 255 255 if (node_regs_mask & (1<<0)) check_node(regs[REG_EAX]); … … 271 271 check_xp(ExceptionInformation *xp) 272 272 { 273 natural *regs = (natural *) xpGPRvector(xp) , dnode;273 natural *regs = (natural *) xpGPRvector(xp); 274 274 275 275 check_node(regs[Iarg_z]); … … 1526 1526 natural *regs = (natural *) xpGPRvector(xp), dnode; 1527 1527 LispObj eip; 1528 int i;1529 1528 1530 1529 if (node_regs_mask & (1<<0)) mark_root(regs[REG_EAX]); -
trunk/source/lisp-kernel/x86_print.c
r13067 r14295 316 316 add_char(' '); 317 317 } else if (lfbits & lfbits_gfn_mask) { 318 LispObj gf_slots;319 LispObj gf_name;320 321 318 add_c_string("Generic Function "); 322 319 323 320 #ifdef X8632 324 gf_slots = nth_immediate(o, 2); 325 gf_name = deref(gf_slots, 2); 326 sprint_lisp_object(gf_name, depth); 327 add_char(' '); 321 { 322 LispObj gf_slots = nth_immediate(o, 2); 323 LispObj gf_name = deref(gf_slots, 2); 324 325 sprint_lisp_object(gf_name, depth); 326 add_char(' '); 327 } 328 328 #endif 329 329 } else {
Note: See TracChangeset
for help on using the changeset viewer.