xref: /f-stack/lib/include/sys/sx.h (revision 2317ada5)
122ce4affSfengbojiang /*-
222ce4affSfengbojiang  * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
322ce4affSfengbojiang  *
422ce4affSfengbojiang  * Copyright (c) 2007 Attilio Rao <[email protected]>
522ce4affSfengbojiang  * Copyright (c) 2001 Jason Evans <[email protected]>
6*2317ada5Sfengbojiang  * Copyright (C) 2017-2021 THL A29 Limited, a Tencent company.
722ce4affSfengbojiang  * All rights reserved.
822ce4affSfengbojiang  *
922ce4affSfengbojiang  * Redistribution and use in source and binary forms, with or without
1022ce4affSfengbojiang  * modification, are permitted provided that the following conditions
1122ce4affSfengbojiang  * are met:
1222ce4affSfengbojiang  * 1. Redistributions of source code must retain the above copyright
1322ce4affSfengbojiang  *    notice(s), this list of conditions and the following disclaimer as
1422ce4affSfengbojiang  *    the first lines of this file unmodified other than the possible
1522ce4affSfengbojiang  *    addition of one or more copyright notices.
1622ce4affSfengbojiang  * 2. Redistributions in binary form must reproduce the above copyright
1722ce4affSfengbojiang  *    notice(s), this list of conditions and the following disclaimer in the
1822ce4affSfengbojiang  *    documentation and/or other materials provided with the distribution.
1922ce4affSfengbojiang  *
2022ce4affSfengbojiang  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) ``AS IS'' AND ANY
2122ce4affSfengbojiang  * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
2222ce4affSfengbojiang  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
2322ce4affSfengbojiang  * DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) BE LIABLE FOR ANY
2422ce4affSfengbojiang  * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
2522ce4affSfengbojiang  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
2622ce4affSfengbojiang  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
2722ce4affSfengbojiang  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2822ce4affSfengbojiang  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2922ce4affSfengbojiang  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
3022ce4affSfengbojiang  * DAMAGE.
3122ce4affSfengbojiang  *
3222ce4affSfengbojiang  * $FreeBSD$
3322ce4affSfengbojiang  */
3422ce4affSfengbojiang 
3522ce4affSfengbojiang #ifndef _FSTACK_SYS_SX_H_
3622ce4affSfengbojiang #define _FSTACK_SYS_SX_H_
3722ce4affSfengbojiang 
3822ce4affSfengbojiang #include_next <sys/sx.h>
3922ce4affSfengbojiang 
4022ce4affSfengbojiang #define sx_try_slock_int(sx) (1)
4122ce4affSfengbojiang #define sx_try_xlock_int(sx) (1)
4222ce4affSfengbojiang 
4322ce4affSfengbojiang #define _sx_slock_int(sx, arg) (0)
4422ce4affSfengbojiang #define _sx_sunlock_int(sx) do {} while(0)
4522ce4affSfengbojiang 
4622ce4affSfengbojiang #endif    /* _FSTACK_SYS_SX_H_ */
47