blob: 802da4b0279d695894738ecdf6fd78a08b1e85a1 [file] [log] [blame]
/*
* Copyright (c) 2002, Intel Corporation. All rights reserved.
* Created by: bing.wei.liu REMOVE-THIS AT intel DOT com
* This file is licensed under the GPL license. For the full content
* of this license, see the COPYING file at the top level of this
* source tree.
* Test that the macro PTHREAD_MUTEX_INITIALIZER can be sued to intiailize
* mutexes that are statically allocated.
*
*/
#include <pthread.h>
#include <stdio.h>
#include <errno.h>
#include "posixtest.h"
typedef struct my_data {
pthread_mutex_t mutex; /* Protects access to value */
int value; /* Access protected by mutex */
} my_data_t;
my_data_t data = {PTHREAD_MUTEX_INITIALIZER, 0};
int main()
{
printf("Test PASSED\n");
return PTS_PASS;
}