1 /*--------------------------------------------------------------------*/
2 /*--- Basic Mach traps. mach_traps-x86-darwin.S ---*/
3 /*--------------------------------------------------------------------*/
6 This file is part of Valgrind, a dynamic binary instrumentation
9 Copyright (C) 2006-2017 Apple Inc.
10 Greg Parker gparker@apple.com
12 This program is free software; you can redistribute it and/or
13 modify it under the terms of the GNU General Public License as
14 published by the Free Software Foundation; either version 2 of the
15 License, or (at your option) any later version.
17 This program is distributed in the hope that it will be useful, but
18 WITHOUT ANY WARRANTY; without even the implied warranty of
19 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 General Public License for more details.
22 You should have received a copy of the GNU General Public License
23 along with this program; if not, see <http://www.gnu.org/licenses/>.
25 The GNU General Public License is contained in the file COPYING.
28 #include "pub_core_basics_asm.h"
30 #if defined(VGP_x86_darwin)
32 // DDD: should use __NR_ constants in here instead of the trap numbers
35 // mach_port_name_t task_self_trap(void)
38 .globl _task_self_trap
44 // mach_port_name_t host_self_trap(void)
47 .globl _host_self_trap
53 // mach_port_name_t thread_self_trap(void)
56 .globl _thread_self_trap
62 // mach_msg_return_t mach_msg_trap(...)
71 // mach_port_t mach_reply_port(...)
74 .globl _mach_reply_port
80 // boolean_t swtch_pri(int)
89 // kern_return_t semaphore_wait(semaphore_t)
92 .globl _semaphore_wait
98 // kern_return_t semaphore_signal(semaphore_t)
101 .globl _semaphore_signal
107 // kern_return_t semaphore_signal_thread(semaphore_t, thread_t)
110 .globl _semaphore_signal_thread
111 _semaphore_signal_thread:
116 // kern_return_t semaphore_wait_signal(semaphore_t, semaphore_t)
119 .globl _semaphore_wait_signal
120 _semaphore_wait_signal:
125 #endif // defined(VGP_x86_darwin)
127 /* Let the linker know we don't need an executable stack */
130 /*--------------------------------------------------------------------*/
132 /*--------------------------------------------------------------------*/