mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-24 14:00:30 +00:00
hurd: Avoid PLTs for __mach_thread_self and __mach_reply_port
* mach/mach/mach_traps.h (__mach_reply_port, __mach_thread_self, __mach_task_self, __mach_host_self, __swtch, __swtch_pri, __thread_switch, __evc_wait): Move declarations to... * sysdeps/mach/include/mach/mach_traps.h: ... new file, and add attribute_hidden.
This commit is contained in:
parent
c8c6e6d6d0
commit
126b3ec370
@ -5,6 +5,11 @@
|
|||||||
* sysdeps/mach/hurd/localplt.data (ld.so): Add __open64, rename
|
* sysdeps/mach/hurd/localplt.data (ld.so): Add __open64, rename
|
||||||
__libc_read and __libc_write to __read and __write.
|
__libc_read and __libc_write to __read and __write.
|
||||||
* sysdeps/hurd/include/hurd/port.h: New file.
|
* sysdeps/hurd/include/hurd/port.h: New file.
|
||||||
|
* mach/mach/mach_traps.h (__mach_reply_port, __mach_thread_self,
|
||||||
|
__mach_task_self, __mach_host_self, __swtch, __swtch_pri,
|
||||||
|
__thread_switch, __evc_wait): Move declarations to...
|
||||||
|
* sysdeps/mach/include/mach/mach_traps.h: ... new file, and add
|
||||||
|
attribute_hidden.
|
||||||
|
|
||||||
2018-06-13 Joseph Myers <joseph@codesourcery.com>
|
2018-06-13 Joseph Myers <joseph@codesourcery.com>
|
||||||
|
|
||||||
|
@ -29,33 +29,27 @@
|
|||||||
|
|
||||||
/* Create and return a new receive right. */
|
/* Create and return a new receive right. */
|
||||||
extern mach_port_t mach_reply_port (void);
|
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. */
|
/* 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);
|
||||||
extern mach_port_t __mach_thread_self (void);
|
|
||||||
|
|
||||||
/* Return the task control port for the calling task.
|
/* Return the task control port for the calling task.
|
||||||
The parens are needed to protect against the macro in <mach_init.h>. */
|
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);
|
||||||
extern mach_port_t (__mach_task_self) (void);
|
|
||||||
|
|
||||||
/* Return the host information port for the host of the calling task.
|
/* 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>. */
|
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);
|
||||||
extern mach_port_t (__mach_host_self) (void);
|
|
||||||
|
|
||||||
/* Attempt to context switch the current thread off the processor. Returns
|
/* 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. */
|
true if there are other threads that can be run and false if not. */
|
||||||
extern boolean_t swtch (void);
|
extern boolean_t swtch (void);
|
||||||
extern boolean_t __swtch (void);
|
|
||||||
|
|
||||||
/* Attempt to context switch the current thread off the processor. Lower
|
/* Attempt to context switch the current thread off the processor. Lower
|
||||||
the thread's priority as much as possible. The thread's priority will
|
the thread's priority as much as possible. The thread's priority will
|
||||||
be restored when it runs again. PRIORITY is currently unused. Return
|
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. */
|
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);
|
||||||
extern boolean_t __swtch_pri (int priority);
|
|
||||||
|
|
||||||
/* Attempt to context switch the current thread off the processor. Try
|
/* Attempt to context switch the current thread off the processor. Try
|
||||||
to run NEW_THREAD next, ignoring normal scheduling policies. The
|
to run NEW_THREAD next, ignoring normal scheduling policies. The
|
||||||
@ -66,13 +60,10 @@ extern boolean_t __swtch_pri (int priority);
|
|||||||
swtch_pri. If OPTION is SWITCH_OPTION_NONE, ignore TIME. */
|
swtch_pri. If OPTION is SWITCH_OPTION_NONE, ignore TIME. */
|
||||||
kern_return_t thread_switch (mach_port_t new_thread,
|
kern_return_t thread_switch (mach_port_t new_thread,
|
||||||
int option, mach_msg_timeout_t option_time);
|
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
|
/* Block the current thread until the kernel (or device) event
|
||||||
identified by EVENT occurs. */
|
identified by EVENT occurs. */
|
||||||
kern_return_t evc_wait (unsigned int event);
|
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
|
/* Display a null-terminated character string on the Mach console. This
|
||||||
system call is meant as a debugging tool useful to circumvent messaging
|
system call is meant as a debugging tool useful to circumvent messaging
|
||||||
|
13
sysdeps/mach/include/mach/mach_traps.h
Normal file
13
sysdeps/mach/include/mach/mach_traps.h
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
#ifndef _MACH_MACH_TRAPS_H
|
||||||
|
#include_next <mach/mach_traps.h>
|
||||||
|
|
||||||
|
extern mach_port_t __mach_reply_port (void) attribute_hidden;
|
||||||
|
extern mach_port_t __mach_thread_self (void) attribute_hidden;
|
||||||
|
extern mach_port_t (__mach_task_self) (void) attribute_hidden;
|
||||||
|
extern mach_port_t (__mach_host_self) (void) attribute_hidden;
|
||||||
|
extern boolean_t __swtch (void) attribute_hidden;
|
||||||
|
extern boolean_t __swtch_pri (int priority) attribute_hidden;
|
||||||
|
kern_return_t __thread_switch (mach_port_t new_thread,
|
||||||
|
int option, mach_msg_timeout_t option_time) attribute_hidden;
|
||||||
|
kern_return_t __evc_wait (unsigned int event) attribute_hidden;
|
||||||
|
#endif
|
Loading…
Reference in New Issue
Block a user