diff options
author | rpj <rpj> | 1999-02-22 02:54:12 +0000 |
---|---|---|
committer | rpj <rpj> | 1999-02-22 02:54:12 +0000 |
commit | 2ef097640758653a0e9d63e90a4aac329cd86368 (patch) | |
tree | 71751f699b0aedba3227446ac228d30f2a127173 /tests/self1.c | |
parent | 943bc9bb02212649a83ec32152299d50d34226e6 (diff) |
1999-02-23 Ross Johnson <rpj@ise.canberra.edu.au>
* Makefile: Some refinement.
* *.c: More exhaustive checking through assertions; clean up;
add some more tests.
Diffstat (limited to 'tests/self1.c')
-rw-r--r-- | tests/self1.c | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/tests/self1.c b/tests/self1.c index 0addfc8..d460818 100644 --- a/tests/self1.c +++ b/tests/self1.c @@ -1,21 +1,26 @@ /* + * self1.c + * * Test for pthread_self(). * - * Depends on API functions: None. + * Depends on API functions: + * pthread_self() + * + * Implicitly depends on: + * pthread_getspecific() + * pthread_setspecific() */ -#include <pthread.h> +#include "test.h" int main(int argc, char * argv[]) { - pthread_t id; - - /* We can't do anything with this, though, because it is not - safe to assume anything about the internal structure of - a `pthread_t'. */ - - id = pthread_self(); + /* + * This should always succeed unless the system has no + * resources (memory) left. + */ + assert(pthread_self() != NULL); return 0; } |