summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbje <bje>1998-10-04 05:56:26 +0000
committerbje <bje>1998-10-04 05:56:26 +0000
commite7a772589fde372895d33a2c480302775f2d62c3 (patch)
treefd3e812b55627934dd767d7d27550582c36d0249
parent5304897a03ee218b5b36d2c5e7f83d970c4b1b46 (diff)
1998-10-04 Ben Elliston <bje@cygnus.com>
* tests/mutex2.c: Test pthread_mutex_trylock(). Passes. * tests/mutex1.c (main): Eliminate warning.
-rw-r--r--ChangeLog3
-rw-r--r--tests/mutex1.c3
-rw-r--r--tests/mutex2.c12
3 files changed, 18 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 4000891..cbabbdf 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,9 @@
1998-10-04 Ben Elliston <bje@cygnus.com>
+ * tests/mutex2.c: Test pthread_mutex_trylock(). Passes.
+
* tests/mutex1.c: New basic test for mutex functions (it passes).
+ (main): Eliminate warning.
* configure.in: Test for __stdcall, not _stdcall. Typo.
diff --git a/tests/mutex1.c b/tests/mutex1.c
index 087483d..27e2a82 100644
--- a/tests/mutex1.c
+++ b/tests/mutex1.c
@@ -9,9 +9,12 @@
pthread_mutex_t mutex1;
+int
main()
{
pthread_mutex_init(&mutex1, NULL);
pthread_mutex_lock(&mutex1);
pthread_mutex_unlock(&mutex1);
+
+ return 0;
}
diff --git a/tests/mutex2.c b/tests/mutex2.c
new file mode 100644
index 0000000..224b7ea
--- /dev/null
+++ b/tests/mutex2.c
@@ -0,0 +1,12 @@
+#include <pthread.h>
+
+pthread_mutex_t mutex1;
+
+main()
+{
+ pthread_mutex_init(&mutex1, NULL);
+ pthread_mutex_trylock(&mutex1);
+ pthread_mutex_unlock(&mutex1);
+
+ return 0;
+}