genericopenlibs/openenvcore/libpthread/src/pthread_mutexattr_getpshared.cpp
changeset 0 e4d67989cc36
equal deleted inserted replaced
-1:000000000000 0:e4d67989cc36
       
     1 // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 // Name        : pthread_mutexattr_getpshared.cpp
       
    15 // Part of     : pthread
       
    16 // Interface   : POSIX, pthread
       
    17 // POSIX implementation of mutexes on Symbian
       
    18 // Version     :
       
    19 //
       
    20 
       
    21 
       
    22 
       
    23 #include "mutextypes.h"
       
    24 
       
    25 /*
       
    26 This function retrieves the current value of the process shared attribute in 
       
    27 attr and stores it in the location pointed to by pshared.
       
    28 */
       
    29 EXPORT_C int pthread_mutexattr_getpshared (const pthread_mutexattr_t * attr, 
       
    30                                            int *pshared)
       
    31 {
       
    32     if(!VALID_MUTEX_ATTR(attr) || !pshared)
       
    33     {
       
    34         return EINVAL;
       
    35     }
       
    36     *pshared = attr->iSharedType;
       
    37     return 0;
       
    38 }
       
    39 
       
    40 // End of File