|
Packit |
fe9d6e |
/*
|
|
Packit |
fe9d6e |
* Copyright (c) 2004 Hewlett-Packard Development Company, L.P.
|
|
Packit |
fe9d6e |
*
|
|
Packit |
fe9d6e |
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
Packit |
fe9d6e |
* of this software and associated documentation files (the "Software"), to deal
|
|
Packit |
fe9d6e |
* in the Software without restriction, including without limitation the rights
|
|
Packit |
fe9d6e |
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
Packit |
fe9d6e |
* copies of the Software, and to permit persons to whom the Software is
|
|
Packit |
fe9d6e |
* furnished to do so, subject to the following conditions:
|
|
Packit |
fe9d6e |
*
|
|
Packit |
fe9d6e |
* The above copyright notice and this permission notice shall be included in
|
|
Packit |
fe9d6e |
* all copies or substantial portions of the Software.
|
|
Packit |
fe9d6e |
*
|
|
Packit |
fe9d6e |
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
Packit |
fe9d6e |
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
Packit |
fe9d6e |
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
Packit |
fe9d6e |
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
Packit |
fe9d6e |
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
Packit |
fe9d6e |
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
Packit |
fe9d6e |
* SOFTWARE.
|
|
Packit |
fe9d6e |
*/
|
|
Packit |
fe9d6e |
|
|
Packit |
fe9d6e |
/*
|
|
Packit |
fe9d6e |
* These are common definitions for architectures on which test_and_set
|
|
Packit |
fe9d6e |
* operates on pointer-sized quantities, the "clear" value contains
|
|
Packit |
fe9d6e |
* all zeroes, and the "set" value contains only one lowest bit set.
|
|
Packit |
fe9d6e |
* This can be used if test_and_set is synthesized from compare_and_swap.
|
|
Packit |
fe9d6e |
*/
|
|
Packit |
fe9d6e |
typedef enum {AO_TS_clear = 0, AO_TS_set = 1} AO_TS_val;
|
|
Packit |
fe9d6e |
#define AO_TS_VAL_t AO_TS_val
|
|
Packit |
fe9d6e |
#define AO_TS_CLEAR AO_TS_clear
|
|
Packit |
fe9d6e |
#define AO_TS_SET AO_TS_set
|
|
Packit |
fe9d6e |
|
|
Packit |
fe9d6e |
#define AO_TS_t AO_t
|
|
Packit |
fe9d6e |
|
|
Packit |
fe9d6e |
#define AO_AO_TS_T 1
|