base_os='' ;;
esac
+# Some configurations imply other options.
+case "$os" in
+gnu* | linux* | bsd4.4* | netbsd* | freebsd*)
+ # These systems always use GNU tools.
+ gnu_ld=yes gnu_as=yes
+esac
+case "$os" in
+gnu*elf* | linux* | sysv4* | solaris2*)
+ # These systems always use the ELF format.
+ elf=yes
+esac
+
+
# For sunos4.1.1, try sunos4.1.1, then sunos4.1, then sunos4, then sunos.
tail=$os
ostry=$os
tail=$machine
while m=`echo $tail | sed 's@^\(.*\)/\([^/]*\)$@& \1@'`; test -n "$m"; do
set $m
+ # If using ELF, look for an `elf' subdirectory of each machine directory.
+ if test "$elf" = yes; then
+ mach="$mach /$1/elf"
+ fi
mach="$mach /$1"
tail="$2"
done
# We have now validated the configuration.
-# Some configurations imply other options.
-case "$host_os" in
-gnu* | linux* | bsd4.4* | netbsd* | freebsd*)
- # These systems always use GNU tools.
- gnu_ld=yes gnu_as=yes
-esac
-case "$host_os" in
-gnu*elf* | linux* | sysv4* | solaris2*)
- # These systems always use the ELF format.
- elf=yes
-esac
-
# Remove the leading slashes.
sysnames="`echo $sysnames | sed -e 's@^/@@' -e 's@ /@ @g'`"
sysnames="`echo $fpu_dirs | sed -e 's,^/,,' -e 's, /,,g'` $sysnames"
fi
-# If using ELF, prepend the machine-specific ELF ABI directory.
-if test "$elf" = yes; then
- elf_dirs=
- for m in $mach; do
- if test -d $sysdep_dir$m/elf; then
- elf_dirs="elf_dirs $m/elf"
- fi
- done
- sysnames="`echo elf_dirs | sed -e 's,^/,,' -e 's, /,,g'` $sysnames"
-fi
-
# Expand the list of system names into a full list of directories
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp.
cat > conftest.$ac_ext <<EOF
-#line 1003 "configure"
+#line 997 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
-#line 1017 "configure"
+#line 1011 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
echo $ac_n "(cached) $ac_c" 1>&4
else
cat > conftest.$ac_ext <<EOF
-#line 1069 "configure"
+#line 1063 "configure"
#include "confdefs.h"
#define __need_size_t
#define __need_wchar_t
__mutex_lock (&_hurd_siglock);
for (ss = _hurd_sigstates; ss != NULL; ss = ss->next)
if (ss->thread == thread)
- break;
+ break;
if (ss == NULL)
{
ss = malloc (sizeof (*ss));
int untraced,
error_t result)
{
+ error_t err;
if (reply_port == NULL || *reply_port == MACH_PORT_NULL)
return;
- (untraced ? __msg_sig_post_untraced_reply : __msg_sig_post_reply)
+ err = (untraced ? __msg_sig_post_untraced_reply : __msg_sig_post_reply)
(*reply_port, reply_port_type, result);
*reply_port = MACH_PORT_NULL;
+ if (err != MACH_SEND_INVALID_DEST) /* Ignore dead reply port. */
+ assert_perror (err);
}
{
if (!(state->set & THREAD_ABORTED))
{
- __thread_abort (ss->thread);
+ error_t err = __thread_abort (ss->thread);
+ assert_perror (err);
/* Clear all thread state flavor set bits, because thread_abort may
have changed the state. */
state->set = THREAD_ABORTED;
mach_msg_type_name_t reply_port_type,
int untraced)
{
+ error_t err;
struct machine_thread_all_state thread_state;
enum { stop, ignore, core, term, handle } act;
sighandler_t handler;
{
if (threads[i] != _hurd_msgport_thread &&
(act != handle || threads[i] != ss->thread))
- __thread_resume (threads[i]);
- __mach_port_deallocate (__mach_task_self (), threads[i]);
+ {
+ err = __thread_resume (threads[i]);
+ assert_perror (err);
+ }
+ err = __mach_port_deallocate (__mach_task_self (),
+ threads[i]);
+ assert_perror (err);
}
__vm_deallocate (__mach_task_self (),
(vm_address_t) threads,
{
case stop:
if (_hurd_stopped)
- /* We are already stopped, but receiving an untraced stop
- signal. Instead of resuming and suspending again, just
- notify the proc server of the new stop signal. */
- __USEPORT (PROC, __proc_mark_stop (port, signo));
+ {
+ /* We are already stopped, but receiving an untraced stop
+ signal. Instead of resuming and suspending again, just
+ notify the proc server of the new stop signal. */
+ error_t err = __USEPORT (PROC, __proc_mark_stop (port, signo));
+ assert_perror (err);
+ }
else
/* Suspend the process. */
suspend ();
case core: /* And leave a rotting corpse. */
nirvana:
/* Have the proc server stop all other threads in our task. */
- __USEPORT (PROC, __proc_dostop (port, _hurd_msgport_thread));
+ err = __USEPORT (PROC, __proc_dostop (port, _hurd_msgport_thread));
+ assert_perror (err);
/* No more user instructions will be executed.
The signal can now be considered delivered. */
reply ();
/* Stop the thread and abort its pending RPC operations. */
if (! ss_suspended)
- __thread_suspend (ss->thread);
+ {
+ err = __thread_suspend (ss->thread);
+ assert_perror (err);
+ }
/* Abort the thread's kernel context, so any pending message send
or receive completes immediately or aborts. If an interruptible
/* Start the thread running the handler (or possibly waiting for an
RPC reply before running the handler). */
- __thread_set_state (ss->thread, MACHINE_THREAD_STATE_FLAVOR,
- (natural_t *) &thread_state.basic,
- MACHINE_THREAD_STATE_COUNT);
- __thread_resume (ss->thread);
+ err = __thread_set_state (ss->thread, MACHINE_THREAD_STATE_FLAVOR,
+ (natural_t *) &thread_state.basic,
+ MACHINE_THREAD_STATE_COUNT);
+ assert_perror (err);
+ err = __thread_resume (ss->thread);
+ assert_perror (err);
thread_state.set = 0; /* Everything we know is now wrong. */
break;
}