1/*
2 * Copyright (c) 2002, Intel Corporation. All rights reserved.
3 * Created by:  rolla.n.selbak REMOVE-THIS AT intel DOT com
4 * This file is licensed under the GPL license.  For the full content
5 * of this license, see the COPYING file at the top level of this
6 * source tree.
7
8 * Upon successful completion, pthread_attr_destroy() shall return a value of 0.
9 *
10 * Steps:
11 * 1.  Initialize a pthread_attr_t object using pthread_attr_init()
12 * 2.  Destroy that initialized attribute using pthread_attr_destroy().
13 *     This should return 0;
14 *
15 */
16
17#include <pthread.h>
18#include <stdio.h>
19#include <errno.h>
20#include "posixtest.h"
21
22
23int main()
24{
25	pthread_attr_t new_attr;
26
27	/* Initialize attribute */
28	if(pthread_attr_init(&new_attr) != 0)
29	{
30		perror("Cannot initialize attribute object\n");
31		return PTS_UNRESOLVED;
32	}
33
34	/* Destroy attribute */
35	if(pthread_attr_destroy(&new_attr) != 0)
36	{
37		printf("Test FAILED\n");
38		return PTS_FAIL;
39	}
40	else
41	{
42		printf("Test PASSED\n");
43		return PTS_PASS;
44	}
45}
46
47
48