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, write to the Free Software
24 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
27 The GNU General Public License is contained in the file COPYING.
30 #include "pub_core_basics_asm.h"
32 #if defined(VGP_x86_darwin)
34 // DDD: should use __NR_ constants in here instead of the trap numbers
37 // mach_port_name_t task_self_trap(void)
40 .globl _task_self_trap
46 // mach_port_name_t host_self_trap(void)
49 .globl _host_self_trap
55 // mach_port_name_t thread_self_trap(void)
58 .globl _thread_self_trap
64 // mach_msg_return_t mach_msg_trap(...)
73 // mach_port_t mach_reply_port(...)
76 .globl _mach_reply_port
82 // boolean_t swtch_pri(int)
91 // kern_return_t semaphore_wait(semaphore_t)
94 .globl _semaphore_wait
100 // kern_return_t semaphore_signal(semaphore_t)
103 .globl _semaphore_signal
109 // kern_return_t semaphore_signal_thread(semaphore_t, thread_t)
112 .globl _semaphore_signal_thread
113 _semaphore_signal_thread:
118 // kern_return_t semaphore_wait_signal(semaphore_t, semaphore_t)
121 .globl _semaphore_wait_signal
122 _semaphore_wait_signal:
127 #endif // defined(VGP_x86_darwin)
129 /* Let the linker know we don't need an executable stack */
132 /*--------------------------------------------------------------------*/
134 /*--------------------------------------------------------------------*/