1177853Sdavidxu/*- 2177853Sdavidxu * Copyright (C) 2008 David Xu <davidxu@freebsd.org> 3177853Sdavidxu * All rights reserved. 4177853Sdavidxu * 5177853Sdavidxu * Redistribution and use in source and binary forms, with or without 6177853Sdavidxu * modification, are permitted provided that the following conditions 7177853Sdavidxu * are met: 8177853Sdavidxu * 1. Redistributions of source code must retain the above copyright 9177853Sdavidxu * notice, this list of conditions and the following disclaimer. 10177853Sdavidxu * 2. Neither the name of the author nor the names of its contributors 11177853Sdavidxu * may be used to endorse or promote products derived from this software 12177853Sdavidxu * without specific prior written permission. 13177853Sdavidxu * 14177853Sdavidxu * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 15177853Sdavidxu * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16177853Sdavidxu * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17177853Sdavidxu * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 18177853Sdavidxu * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19177853Sdavidxu * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20177853Sdavidxu * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21177853Sdavidxu * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22177853Sdavidxu * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23177853Sdavidxu * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24177853Sdavidxu * SUCH DAMAGE. 25177853Sdavidxu * 26177853Sdavidxu * $FreeBSD$ 27177853Sdavidxu */ 28177853Sdavidxu 29177853Sdavidxu#include <sys/syscall.h> 30177853Sdavidxu#include <machine/asm.h> 31177853Sdavidxu 32177853Sdavidxu#define RSYSCALL_ERR(x) ENTRY(__CONCAT(x, _err)); \ 33177853Sdavidxu mov __CONCAT($SYS_,x),%rax; KERNCALL; ret; 34177853Sdavidxu 35177853Sdavidxu#define KERNCALL movq %rcx, %r10; syscall 36177853Sdavidxu 37177853SdavidxuRSYSCALL_ERR(_umtx_op) 38217107Skib 39217107Skib .section .note.GNU-stack,"",%progbits 40