diff options
author | rpj <rpj> | 1999-01-01 22:17:49 +0000 |
---|---|---|
committer | rpj <rpj> | 1999-01-01 22:17:49 +0000 |
commit | 63d8161801576f3acd5169b472946f4a687c4728 (patch) | |
tree | 9b731229b2ecb42bf78b54ba227f155673ff84d2 /tests/Template.c | |
parent | 0749394433f301cccd22d280cee1dd760b72e876 (diff) |
Wed Dec 30 11:22:44 1998 Ross Johnson <rpj@ixobrychus.canberra.edu.au>
* tsd1.c: Re-written. See comments at start of file.
* Template.c: New. Contains skeleton code and comment template
intended to fully document the test.
Diffstat (limited to 'tests/Template.c')
-rw-r--r-- | tests/Template.c | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/tests/Template.c b/tests/Template.c new file mode 100644 index 0000000..50a81bf --- /dev/null +++ b/tests/Template.c @@ -0,0 +1,68 @@ +/* + * File: + * + * Test Synopsis: + * - + * + * Test Method (Validation or Falsification): + * - + * + * Requirements Tested: + * - + * + * Features Tested: + * - + * + * Cases Tested: + * - + * + * Description: + * - + * + * Environment: + * - + * + * Input: + * - + * + * Output: + * - + * + * Assumptions: + * - + * + * Pass Criteria: + * - + * + * Fail Criteria: + * - + */ + +#include <pthread.h> +#include <stdio.h> + +pthread_key_t key; +pthread_once_t key_once = PTHREAD_ONCE_INIT; + +void * +mythread(void * arg) +{ + return 0; +} + +int +main() +{ + int rc; + pthread_t t1, t2; + + rc = pthread_create(&t1, NULL, mythread, (void *) 1); + printf("pthread_create returned %d\n", rc); + + rc = pthread_create(&t2, NULL, mythread, (void *) 2); + printf("pthread_create returned %d\n", rc); + + /* Give threads time to run. */ + Sleep(2000); + return 0; +} |