source: rtems/cpukit/posix/src/mutexattrgettype.c @ 8f6b7b51

4.104.115
Last change on this file since 8f6b7b51 was 863a24e, checked in by Joel Sherrill <joel.sherrill@…>, on 07/17/09 at 16:17:59

2009-07-17 Joel Sherrill <joel.sherrill@…>

  • posix/src/mutexattrgettype.c: Restructure a bit to make code coverage analysis easier.
  • Property mode set to 100644
File size: 856 bytes
Line 
1/*
2 *  COPYRIGHT (c) 1989-2009.
3 *  On-Line Applications Research Corporation (OAR).
4 *
5 *  The license and distribution terms for this file may be
6 *  found in the file LICENSE in this distribution or at
7 *  http://www.rtems.com/license/LICENSE.
8 *
9 *  $Id$
10 */
11
12#if HAVE_CONFIG_H
13#include "config.h"
14#endif
15
16#include <errno.h>
17#include <pthread.h>
18
19#include <rtems/system.h>
20#include <rtems/score/coremutex.h>
21#include <rtems/score/watchdog.h>
22#include <rtems/posix/mutex.h>
23#include <rtems/posix/priority.h>
24#include <rtems/posix/time.h>
25
26#if defined(_UNIX98_THREAD_MUTEX_ATTRIBUTES)
27int pthread_mutexattr_gettype(
28  const pthread_mutexattr_t *attr,
29  int                       *type
30)
31{
32  if ( !attr )
33    return EINVAL;
34
35  if ( !attr->is_initialized )
36    return EINVAL;
37
38  if ( !type )
39    return EINVAL;
40
41  *type = attr->type;
42  return 0;
43}
44#endif
45
Note: See TracBrowser for help on using the repository browser.