summaryrefslogtreecommitdiff
path: root/mach/mach
diff options
context:
space:
mode:
Diffstat (limited to 'mach/mach')
-rw-r--r--mach/mach/mach_traps.h19
-rw-r--r--mach/mach/mig_support.h18
2 files changed, 11 insertions, 26 deletions
diff --git a/mach/mach/mach_traps.h b/mach/mach/mach_traps.h
index 10dd3703f2..b87ea9e745 100644
--- a/mach/mach/mach_traps.h
+++ b/mach/mach/mach_traps.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1994-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -17,8 +17,7 @@
/* Declare the few Mach system calls (except mach_msg, in <mach/message.h>).
This does not include the kernel RPC shortcut calls (in <mach-shortcuts.h>).
-
- This file omits the MACH_IPC_COMPAT functions. */
+ */
#ifndef _MACH_MACH_TRAPS_H
@@ -30,33 +29,27 @@
/* Create and return a new receive right. */
extern mach_port_t mach_reply_port (void);
-extern mach_port_t __mach_reply_port (void);
/* Return the thread control port for the calling thread. */
extern mach_port_t mach_thread_self (void);
-extern mach_port_t __mach_thread_self (void);
/* Return the task control port for the calling task.
The parens are needed to protect against the macro in <mach_init.h>. */
extern mach_port_t (mach_task_self) (void);
-extern mach_port_t (__mach_task_self) (void);
/* Return the host information port for the host of the calling task.
The parens are needed to protect against the macro in <mach_init.h>. */
extern mach_port_t (mach_host_self) (void);
-extern mach_port_t (__mach_host_self) (void);
/* Attempt to context switch the current thread off the processor. Returns
true if there are other threads that can be run and false if not. */
extern boolean_t swtch (void);
-extern boolean_t __swtch (void);
/* Attempt to context switch the current thread off the processor. Lower
the thread's priority as much as possible. The thread's priority will
be restored when it runs again. PRIORITY is currently unused. Return
true if there are other threads that can be run and false if not. */
extern boolean_t swtch_pri (int priority);
-extern boolean_t __swtch_pri (int priority);
/* Attempt to context switch the current thread off the processor. Try
to run NEW_THREAD next, ignoring normal scheduling policies. The
@@ -67,13 +60,15 @@ extern boolean_t __swtch_pri (int priority);
swtch_pri. If OPTION is SWITCH_OPTION_NONE, ignore TIME. */
kern_return_t thread_switch (mach_port_t new_thread,
int option, mach_msg_timeout_t option_time);
-kern_return_t __thread_switch (mach_port_t new_thread,
- int option, mach_msg_timeout_t option_time);
/* Block the current thread until the kernel (or device) event
identified by EVENT occurs. */
kern_return_t evc_wait (unsigned int event);
-kern_return_t __evc_wait (unsigned int event);
+/* Display a null-terminated character string on the Mach console. This
+ system call is meant as a debugging tool useful to circumvent messaging
+ altogether. */
+
+extern void mach_print(const char *s);
#endif /* mach/mach_traps.h */
diff --git a/mach/mach/mig_support.h b/mach/mach/mig_support.h
index b83b1d0b5c..fc17062b6a 100644
--- a/mach/mach/mig_support.h
+++ b/mach/mach/mig_support.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1993-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -26,19 +26,6 @@
#include <sys/types.h>
#include <string.h>
-#ifndef __USE_GNU
-/* The only problem that has come up so far is __stpncpy being undeclared
- below because <string.h> doesn't declare it without __USE_GNU. We could
- work around that problem by just adding the declaration there, or by
- eliding the inline functions in the absence of __USE_GNU. But either of
- these would result in unoptimized calls (because no inline version of
- __stpncpy will have been defined), and there may be other niggling
- problems lurking. Instead we simply insist on _GNU_SOURCE for
- compiling mig output; anyway, that better reflects the fact that mig
- output requires nonstandard special support code not found elsewhere. */
-# error mig stubs must be compiled with -D_GNU_SOURCE
-#endif
-
/* MiG initialization. */
extern void __mig_init (void *__first);
extern void mig_init (void *__first);
@@ -66,6 +53,8 @@ extern void mig_reply_setup (const mach_msg_header_t *__request,
/* Idiocy support function. */
extern vm_size_t mig_strncpy (char *__dst, const char *__src, vm_size_t __len);
extern vm_size_t __mig_strncpy (char *__dst, const char *__src, vm_size_t);
+
+#if defined __USE_EXTERN_INLINES && defined _LIBC
__extern_inline vm_size_t
__mig_strncpy (char *__dst, const char *__src, vm_size_t __len)
{
@@ -76,6 +65,7 @@ mig_strncpy (char *__dst, const char *__src, vm_size_t __len)
{
return __mig_strncpy (__dst, __src, __len);
}
+#endif