2 * Copyright (c) 2004, Intel Corporation. All rights reserved.
3 * Created by: crystal.xiong 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
8 * Test pthread_attr_setscope()
11 * 1. Initialize a pthread_attr_t object using pthread_attr_init()
12 * 2. Call pthread_attr_setscope with unsupported scope
21 #include "posixtest.h"
24 #define FUNCTION "pthread_attr_setscope"
25 #define ERROR_PREFIX "unexpected error: " FUNCTION " " TEST ": "
27 #define INVALIDSCOPE 999
34 rc = pthread_attr_init(&attr);
36 perror(ERROR_PREFIX "pthread_attr_init");
40 rc = pthread_attr_setscope(&attr, INVALIDSCOPE);
42 perror(ERROR_PREFIX "pthread_attr_setscope");
45 rc = pthread_attr_destroy(&attr);
47 perror(ERROR_PREFIX "pthread_attr_destroy");
50 printf("Test PASS\n");