1151611Sdavidxu/* 2151611Sdavidxu * Copyright (c) 2005 David Xu <davidxu@freebsd.org> 3151611Sdavidxu * All rights reserved. 4151611Sdavidxu * 5151611Sdavidxu * Redistribution and use in source and binary forms, with or without 6151611Sdavidxu * modification, are permitted provided that the following conditions 7151611Sdavidxu * are met: 8151611Sdavidxu * 1. Redistributions of source code must retain the above copyright 9151611Sdavidxu * notice unmodified, this list of conditions, and the following 10151611Sdavidxu * disclaimer. 11151611Sdavidxu * 2. Redistributions in binary form must reproduce the above copyright 12151611Sdavidxu * notice, this list of conditions and the following disclaimer in the 13151611Sdavidxu * documentation and/or other materials provided with the distribution. 14151611Sdavidxu * 15151611Sdavidxu * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 16151611Sdavidxu * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 17151611Sdavidxu * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 18151611Sdavidxu * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 19151611Sdavidxu * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 20151611Sdavidxu * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 21151611Sdavidxu * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 22151611Sdavidxu * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23151611Sdavidxu * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 24151611Sdavidxu * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25151611Sdavidxu * 26151611Sdavidxu * $FreeBSD$ 27151611Sdavidxu * 28151611Sdavidxu */ 29151611Sdavidxu 30151611Sdavidxu#include <errno.h> 31151611Sdavidxu#include "thr_private.h" 32151611Sdavidxu 33174112Sdeischenint _pthread_condattr_getpshared(const pthread_condattr_t *attr, int *pshared); 34174112Sdeischenint _pthread_condattr_setpshared(pthread_condattr_t *attr, int pshared); 35174112Sdeischen 36151611Sdavidxu__weak_reference(_pthread_condattr_getpshared, pthread_condattr_getpshared); 37151611Sdavidxu__weak_reference(_pthread_condattr_setpshared, pthread_condattr_setpshared); 38151611Sdavidxu 39151611Sdavidxuint 40151611Sdavidxu_pthread_condattr_getpshared(const pthread_condattr_t *attr, 41151611Sdavidxu int *pshared) 42151611Sdavidxu{ 43151611Sdavidxu if (attr == NULL || *attr == NULL) 44151611Sdavidxu return (EINVAL); 45151611Sdavidxu 46151611Sdavidxu pshared = PTHREAD_PROCESS_PRIVATE; 47151611Sdavidxu return (0); 48151611Sdavidxu} 49151611Sdavidxu 50151611Sdavidxuint 51151611Sdavidxu_pthread_condattr_setpshared(pthread_condattr_t *attr, int pshared) 52151611Sdavidxu{ 53151611Sdavidxu if (attr == NULL || *attr == NULL) 54151611Sdavidxu return (EINVAL); 55151611Sdavidxu 56151611Sdavidxu if (pshared != PTHREAD_PROCESS_PRIVATE) 57151611Sdavidxu return (EINVAL); 58151611Sdavidxu return (0); 59151611Sdavidxu} 60