diff options
-rw-r--r-- | ChangeLog | 20 | ||||
-rw-r--r-- | DEVELOPMENT | 3 | ||||
-rw-r--r-- | i386/configfrag.ac | 1 | ||||
-rw-r--r-- | ipc/mach_msg.c | 12 | ||||
-rw-r--r-- | kern/eventcount.c | 4 | ||||
-rw-r--r-- | kern/ipc_sched.c | 2 | ||||
-rw-r--r-- | kern/syscall_subr.c | 12 | ||||
-rw-r--r-- | vm/vm_fault.c | 22 | ||||
-rw-r--r-- | vm/vm_pageout.c | 12 | ||||
-rw-r--r-- | vm/vm_resident.c | 4 |
10 files changed, 23 insertions, 69 deletions
@@ -1,5 +1,25 @@ 2006-12-03 Thomas Schwinge <tschwinge@gnu.org> + [patch #5019 --- ``Remove checks for continuations''] + + * DEVELOPMENT: Document the removal. + + * i386/configfrag.ac (CONTINUATIONS): Don't define. + +2006-12-03 Leonardo Lopes Pereira <leonardolopespereira@gmail.com> + + [patch #5019 --- ``Remove checks for continuations''] + * ipc/mach_msg.c: Adopt all users of CONTINUATIONS as if it were always + defined. + * kern/eventcount.c: Likewise. + * kern/ipc_sched.c: Likewise. + * kern/syscall_subr.c: Likewise. + * vm/vm_fault.c: Likewise. + * vm/vm_pageout.c: Likewise. + * vm/vm_resident.c: Likewise. + +2006-12-03 Thomas Schwinge <tschwinge@gnu.org> + [patch #5017 --- ``Remove obsolete IPC interfaces.''] * DEVELOPMENT: Document the removal. diff --git a/DEVELOPMENT b/DEVELOPMENT index ac97b1c..ea02322 100644 --- a/DEVELOPMENT +++ b/DEVELOPMENT @@ -44,6 +44,9 @@ Support for PS2, i860, iPSC 386/860 and MB1/MB2/EXL was removed on Support for the old ipc interface, MACH_IPC_COMPAT, was removed on 2006-12-03. <http://savannah.gnu.org/patch/?5017>. +Support for building without CONTINUATIONS was removed on 2006-12-03. +<http://savannah.gnu.org/patch/?5019>. + Be sure to check the ChangeLog and have a look at the repository at that tag's state if you want to work on those parts of GNU Mach. diff --git a/i386/configfrag.ac b/i386/configfrag.ac index a6c0d7a..d32f2b8 100644 --- a/i386/configfrag.ac +++ b/i386/configfrag.ac @@ -18,7 +18,6 @@ dnl USE OF THIS SOFTWARE. # # Some of the i386-specific code checks for these. -AC_DEFINE([CONTINUATIONS], [1], [CONTINUATIONS]) AC_DEFINE([__ELF__], [1], [__ELF__]) AC_DEFINE([i386], [1], [i386]) diff --git a/ipc/mach_msg.c b/ipc/mach_msg.c index 31ecf89..ddb277c 100644 --- a/ipc/mach_msg.c +++ b/ipc/mach_msg.c @@ -63,10 +63,6 @@ extern void exception_raise_continue(); extern void exception_raise_continue_fast(); -#ifndef CONTINUATIONS -#define mach_msg_receive_continue 0 -#define msg_receive_continue 0 -#endif /* * Routine: mach_msg_send @@ -198,7 +194,6 @@ mach_msg_receive(msg, option, rcv_size, rcv_name, time_out, notify) return mr; /* hold ref for object; mqueue is locked */ -#ifdef CONTINUATIONS /* * ipc_mqueue_receive may not return, because if we block * then our kernel stack may be discarded. So we save @@ -212,7 +207,6 @@ mach_msg_receive(msg, option, rcv_size, rcv_name, time_out, notify) self->ith_notify = notify; self->ith_object = object; self->ith_mqueue = mqueue; -#endif if (option & MACH_RCV_LARGE) { mr = ipc_mqueue_receive(mqueue, option & MACH_RCV_TIMEOUT, @@ -278,7 +272,6 @@ mach_msg_receive(msg, option, rcv_size, rcv_name, time_out, notify) return ipc_kmsg_put(msg, kmsg, kmsg->ikm_header.msgh_size); } -#ifdef CONTINUATIONS /* * Routine: mach_msg_receive_continue * Purpose: @@ -376,7 +369,6 @@ mach_msg_receive_continue() thread_syscall_return(mr); /*NOTREACHED*/ } -#endif /* CONTINUATIONS */ /* * Routine: mach_msg_trap [mach trap] @@ -400,7 +392,6 @@ mach_msg_trap(msg, option, send_size, rcv_size, rcv_name, time_out, notify) { mach_msg_return_t mr; -#ifdef CONTINUATIONS /* first check for common cases */ if (option == (MACH_SEND_MSG|MACH_RCV_MSG)) { @@ -1653,7 +1644,6 @@ mach_msg_trap(msg, option, send_size, rcv_size, rcv_name, time_out, notify) thread_syscall_return(MACH_MSG_SUCCESS); /*NOTREACHED*/ } -#endif /* CONTINUATIONS */ if (option & MACH_SEND_MSG) { mr = mach_msg_send(msg, option, send_size, @@ -1672,7 +1662,6 @@ mach_msg_trap(msg, option, send_size, rcv_size, rcv_name, time_out, notify) return MACH_MSG_SUCCESS; } -#ifdef CONTINUATIONS /* * Routine: mach_msg_continue * Purpose: @@ -1775,4 +1764,3 @@ mach_msg_interrupt(thread) thread->swap_func = thread_exception_return; return TRUE; } -#endif /* CONTINUATIONS */ diff --git a/kern/eventcount.c b/kern/eventcount.c index 14cd989..fe7626d 100644 --- a/kern/eventcount.c +++ b/kern/eventcount.c @@ -126,7 +126,6 @@ void evc_notify_abort(thread_t thread) splx(s); } -#ifdef CONTINUATIONS /* * Just so that we return success, and give * up the stack while blocked @@ -137,9 +136,6 @@ evc_continue(void) thread_syscall_return(KERN_SUCCESS); /* NOTREACHED */ } -#else /* not CONTINUATIONS */ -#define evc_continue 0 -#endif /* not CONTINUATIONS */ /* * User-trappable diff --git a/kern/ipc_sched.c b/kern/ipc_sched.c index 5f7fbf0..60f1283 100644 --- a/kern/ipc_sched.c +++ b/kern/ipc_sched.c @@ -166,7 +166,6 @@ thread_will_wait_with_timeout( #define check_bound_processor(thread) TRUE #endif /* NCPUS > 1 */ -#ifdef CONTINUATIONS /* * Routine: thread_handoff * Purpose: @@ -282,4 +281,3 @@ thread_handoff( counter_always(c_thread_handoff_hits++); return TRUE; } -#endif /* CONTINUATIONS */ diff --git a/kern/syscall_subr.c b/kern/syscall_subr.c index a94e8db..01bd932 100644 --- a/kern/syscall_subr.c +++ b/kern/syscall_subr.c @@ -65,7 +65,6 @@ extern void thread_depress_priority(); extern kern_return_t thread_depress_abort(); -#ifdef CONTINUATIONS void swtch_continue() { register processor_t myprocessor; @@ -75,9 +74,6 @@ void swtch_continue() myprocessor->processor_set->runq.count > 0); /*NOTREACHED*/ } -#else /* not CONTINUATIONS */ -#define swtch_continue 0 -#endif /* not CONTINUATIONS */ boolean_t swtch() { @@ -97,7 +93,6 @@ boolean_t swtch() myprocessor->processor_set->runq.count > 0); } -#ifdef CONTINUATIONS void swtch_pri_continue() { register thread_t thread = current_thread(); @@ -110,9 +105,6 @@ void swtch_pri_continue() myprocessor->processor_set->runq.count > 0); /*NOTREACHED*/ } -#else /* not CONTINUATIONS */ -#define swtch_pri_continue 0 -#endif /* not CONTINUATIONS */ boolean_t swtch_pri(pri) int pri; @@ -149,7 +141,6 @@ boolean_t swtch_pri(pri) extern int hz; -#ifdef CONTINUATIONS void thread_switch_continue() { register thread_t cur_thread = current_thread(); @@ -162,9 +153,6 @@ void thread_switch_continue() thread_syscall_return(KERN_SUCCESS); /*NOTREACHED*/ } -#else /* not CONTINUATIONS */ -#define thread_switch_continue 0 -#endif /* not CONTINUATIONS */ /* * thread_switch: diff --git a/vm/vm_fault.c b/vm/vm_fault.c index a2edd43..f2e5d9c 100644 --- a/vm/vm_fault.c +++ b/vm/vm_fault.c @@ -241,7 +241,6 @@ vm_fault_return_t vm_fault_page(first_object, first_offset, boolean_t look_for_page; vm_prot_t access_required; -#ifdef CONTINUATIONS if (resume) { register vm_fault_state_t *state = (vm_fault_state_t *) current_thread()->ith_other; @@ -255,10 +254,6 @@ vm_fault_return_t vm_fault_page(first_object, first_offset, access_required = state->vmfp_access; goto after_thread_block; } -#else /* not CONTINUATIONS */ - assert(continuation == 0); - assert(!resume); -#endif /* not CONTINUATIONS */ vm_stat_sample(SAMPLED_PC_VM_FAULTS_ANY); vm_stat.faults++; /* needs lock XXX */ @@ -363,7 +358,6 @@ vm_fault_return_t vm_fault_page(first_object, first_offset, PAGE_ASSERT_WAIT(m, interruptible); vm_object_unlock(object); -#ifdef CONTINUATIONS if (continuation != (void (*)()) 0) { register vm_fault_state_t *state = (vm_fault_state_t *) current_thread()->ith_other; @@ -385,7 +379,6 @@ vm_fault_return_t vm_fault_page(first_object, first_offset, counter(c_vm_fault_page_block_busy_user++); thread_block(continuation); } else -#endif /* CONTINUATIONS */ { counter(c_vm_fault_page_block_busy_kernel++); thread_block((void (*)()) 0); @@ -1097,7 +1090,6 @@ vm_fault_return_t vm_fault_page(first_object, first_offset, block_and_backoff: vm_fault_cleanup(object, first_m); -#ifdef CONTINUATIONS if (continuation != (void (*)()) 0) { register vm_fault_state_t *state = (vm_fault_state_t *) current_thread()->ith_other; @@ -1112,7 +1104,6 @@ vm_fault_return_t vm_fault_page(first_object, first_offset, counter(c_vm_fault_page_block_backoff_user++); thread_block(continuation); } else -#endif /* CONTINUATIONS */ { counter(c_vm_fault_page_block_backoff_kernel++); thread_block((void (*)()) 0); @@ -1146,7 +1137,6 @@ vm_fault_return_t vm_fault_page(first_object, first_offset, * and deallocated when leaving vm_fault. */ -#ifdef CONTINUATIONS void vm_fault_continue() { @@ -1160,7 +1150,6 @@ vm_fault_continue() TRUE, state->vmf_continuation); /*NOTREACHED*/ } -#endif /* CONTINUATIONS */ kern_return_t vm_fault(map, vaddr, fault_type, change_wiring, resume, continuation) @@ -1184,7 +1173,6 @@ kern_return_t vm_fault(map, vaddr, fault_type, change_wiring, register vm_page_t m; /* Fast access to result_page */ -#ifdef CONTINUATIONS if (resume) { register vm_fault_state_t *state = (vm_fault_state_t *) current_thread()->ith_other; @@ -1227,10 +1215,6 @@ kern_return_t vm_fault(map, vaddr, fault_type, change_wiring, current_thread()->ith_other = state; } -#else /* not CONTINUATIONS */ - assert(continuation == 0); - assert(!resume); -#endif /* not CONTINUATIONS */ RetryFault: ; @@ -1265,7 +1249,6 @@ kern_return_t vm_fault(map, vaddr, fault_type, change_wiring, object->ref_count++; vm_object_paging_begin(object); -#ifdef CONTINUATIONS if (continuation != (void (*)()) 0) { register vm_fault_state_t *state = (vm_fault_state_t *) current_thread()->ith_other; @@ -1292,7 +1275,6 @@ kern_return_t vm_fault(map, vaddr, fault_type, change_wiring, &prot, &result_page, &top_page, FALSE, vm_fault_continue); } else -#endif /* CONTINUATIONS */ { kr = vm_fault_page(object, offset, fault_type, (change_wiring && !wired), !change_wiring, @@ -1321,7 +1303,6 @@ kern_return_t vm_fault(map, vaddr, fault_type, change_wiring, kr = KERN_SUCCESS; goto done; case VM_FAULT_MEMORY_SHORTAGE: -#ifdef CONTINUATIONS if (continuation != (void (*)()) 0) { register vm_fault_state_t *state = (vm_fault_state_t *) current_thread()->ith_other; @@ -1340,7 +1321,6 @@ kern_return_t vm_fault(map, vaddr, fault_type, change_wiring, VM_PAGE_WAIT(vm_fault_continue); } else -#endif /* CONTINUATIONS */ VM_PAGE_WAIT((void (*)()) 0); goto RetryFault; case VM_FAULT_FICTITIOUS_SHORTAGE: @@ -1506,7 +1486,6 @@ kern_return_t vm_fault(map, vaddr, fault_type, change_wiring, #undef RELEASE_PAGE done: -#ifdef CONTINUATIONS if (continuation != (void (*)()) 0) { register vm_fault_state_t *state = (vm_fault_state_t *) current_thread()->ith_other; @@ -1515,7 +1494,6 @@ kern_return_t vm_fault(map, vaddr, fault_type, change_wiring, (*continuation)(kr); /*NOTREACHED*/ } -#endif /* CONTINUATIONS */ return(kr); } diff --git a/vm/vm_pageout.c b/vm/vm_pageout.c index d058b46..6db1cb7 100644 --- a/vm/vm_pageout.c +++ b/vm/vm_pageout.c @@ -676,18 +676,8 @@ void vm_pageout_scan() thread_will_wait_with_timeout(current_thread(), msecs); counter(c_vm_pageout_scan_block++); thread_block(vm_pageout_scan_continue); -#ifndef CONTINUATIONS - /* - * Unfortunately, we don't have call_continuation - * so we can't rely on tail-recursion. - */ - - vm_pageout_scan_continue(); - goto Restart; -#else /* CONTINUATIONS */ call_continuation(vm_pageout_scan_continue); /*NOTREACHED*/ -#endif /* CONTINUATIONS */ } vm_pageout_inactive++; @@ -886,10 +876,8 @@ void vm_pageout_scan_continue() } vm_page_unlock_queues(); -#ifdef CONTINUATIONS vm_pageout_continue(); /*NOTREACHED*/ -#endif /* CONTINUATIONS */ } /* diff --git a/vm/vm_resident.c b/vm/vm_resident.c index fababc2..1440a0b 100644 --- a/vm/vm_resident.c +++ b/vm/vm_resident.c @@ -1202,10 +1202,6 @@ void vm_page_wait( void (*continuation)(void)) { -#ifndef CONTINUATIONS - assert (continuation == 0); -#endif - /* * We can't use vm_page_free_reserved to make this * determination. Consider: some thread might |