pthread_types.h revision 75ef63d6cf83787233d1c45489c4ec03b0a67d16
175ef63d6cf83787233d1c45489c4ec03b0a67d16Dan Albert/* 275ef63d6cf83787233d1c45489c4ec03b0a67d16Dan Albert * Copyright (C) 2008 The Android Open Source Project 375ef63d6cf83787233d1c45489c4ec03b0a67d16Dan Albert * All rights reserved. 475ef63d6cf83787233d1c45489c4ec03b0a67d16Dan Albert * 575ef63d6cf83787233d1c45489c4ec03b0a67d16Dan Albert * Redistribution and use in source and binary forms, with or without 675ef63d6cf83787233d1c45489c4ec03b0a67d16Dan Albert * modification, are permitted provided that the following conditions 775ef63d6cf83787233d1c45489c4ec03b0a67d16Dan Albert * are met: 875ef63d6cf83787233d1c45489c4ec03b0a67d16Dan Albert * * Redistributions of source code must retain the above copyright 975ef63d6cf83787233d1c45489c4ec03b0a67d16Dan Albert * notice, this list of conditions and the following disclaimer. 1075ef63d6cf83787233d1c45489c4ec03b0a67d16Dan Albert * * Redistributions in binary form must reproduce the above copyright 1175ef63d6cf83787233d1c45489c4ec03b0a67d16Dan Albert * notice, this list of conditions and the following disclaimer in 1275ef63d6cf83787233d1c45489c4ec03b0a67d16Dan Albert * the documentation and/or other materials provided with the 1375ef63d6cf83787233d1c45489c4ec03b0a67d16Dan Albert * distribution. 1475ef63d6cf83787233d1c45489c4ec03b0a67d16Dan Albert * 1575ef63d6cf83787233d1c45489c4ec03b0a67d16Dan Albert * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 1675ef63d6cf83787233d1c45489c4ec03b0a67d16Dan Albert * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 1775ef63d6cf83787233d1c45489c4ec03b0a67d16Dan Albert * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 1875ef63d6cf83787233d1c45489c4ec03b0a67d16Dan Albert * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 1975ef63d6cf83787233d1c45489c4ec03b0a67d16Dan Albert * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 2075ef63d6cf83787233d1c45489c4ec03b0a67d16Dan Albert * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 2175ef63d6cf83787233d1c45489c4ec03b0a67d16Dan Albert * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS 2275ef63d6cf83787233d1c45489c4ec03b0a67d16Dan Albert * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 2375ef63d6cf83787233d1c45489c4ec03b0a67d16Dan Albert * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 2475ef63d6cf83787233d1c45489c4ec03b0a67d16Dan Albert * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 2575ef63d6cf83787233d1c45489c4ec03b0a67d16Dan Albert * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 2675ef63d6cf83787233d1c45489c4ec03b0a67d16Dan Albert * SUCH DAMAGE. 2775ef63d6cf83787233d1c45489c4ec03b0a67d16Dan Albert */ 2875ef63d6cf83787233d1c45489c4ec03b0a67d16Dan Albert 2975ef63d6cf83787233d1c45489c4ec03b0a67d16Dan Albert#ifndef _MACHINE_PTHREAD_TYPES_H_ 3075ef63d6cf83787233d1c45489c4ec03b0a67d16Dan Albert#define _MACHINE_PTHREAD_TYPES_H_ 3175ef63d6cf83787233d1c45489c4ec03b0a67d16Dan Albert 3275ef63d6cf83787233d1c45489c4ec03b0a67d16Dan Albert#include <sys/types.h> 3375ef63d6cf83787233d1c45489c4ec03b0a67d16Dan Albert 3475ef63d6cf83787233d1c45489c4ec03b0a67d16Dan Alberttypedef long pthread_t; 3575ef63d6cf83787233d1c45489c4ec03b0a67d16Dan Albert 3675ef63d6cf83787233d1c45489c4ec03b0a67d16Dan Alberttypedef struct { 3775ef63d6cf83787233d1c45489c4ec03b0a67d16Dan Albert uint32_t flags; 3875ef63d6cf83787233d1c45489c4ec03b0a67d16Dan Albert void* stack_base; 3975ef63d6cf83787233d1c45489c4ec03b0a67d16Dan Albert size_t stack_size; 4075ef63d6cf83787233d1c45489c4ec03b0a67d16Dan Albert size_t guard_size; 4175ef63d6cf83787233d1c45489c4ec03b0a67d16Dan Albert int32_t sched_policy; 4275ef63d6cf83787233d1c45489c4ec03b0a67d16Dan Albert int32_t sched_priority; 4375ef63d6cf83787233d1c45489c4ec03b0a67d16Dan Albert#ifdef __LP64__ 4475ef63d6cf83787233d1c45489c4ec03b0a67d16Dan Albert char __reserved[16]; 4575ef63d6cf83787233d1c45489c4ec03b0a67d16Dan Albert#endif 4675ef63d6cf83787233d1c45489c4ec03b0a67d16Dan Albert} pthread_attr_t; 4775ef63d6cf83787233d1c45489c4ec03b0a67d16Dan Albert 4875ef63d6cf83787233d1c45489c4ec03b0a67d16Dan Albert#endif /* _MACHINE_PTHREAD_TYPES_H_ */ 49