summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjoeh <joeh@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2001-09-04 13:37:38 +0000
committerjoeh <joeh@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2001-09-04 13:37:38 +0000
commit9832406d7336e38d260a2f129807823e783e161e (patch)
tree32f7c9584987b16d2a0b40e87c11ecff86bb1451
parent64088052f5f321b50740471f644e68d907a7c623 (diff)
downloadATCD-9832406d7336e38d260a2f129807823e783e161e.tar.gz
ChangeLogTag: Tue Sep 4 08:36:13 2001 Joe Hoffert <joeh@cs.wustl.edu>
-rw-r--r--PACE/ChangeLog18
-rw-r--r--PACE/pace/pthread.h2
-rw-r--r--PACE/tests/Makefile15
-rw-r--r--PACE/tests/Pthreads_Test.c5
-rw-r--r--PACE/tests/vxworks_stub.c18
5 files changed, 47 insertions, 11 deletions
diff --git a/PACE/ChangeLog b/PACE/ChangeLog
index e30de58d5d7..825f815af0c 100644
--- a/PACE/ChangeLog
+++ b/PACE/ChangeLog
@@ -1,3 +1,21 @@
+Tue Sep 4 08:36:13 2001 Joe Hoffert <joeh@cs.wustl.edu>
+
+ * tests/vxworks_stub.c:
+ Added call to pacevx_vxworks_init to initialize the
+ main thread.
+
+ * tests/Pthreads_Test.c (main):
+ Moved PACE_UNUSED_ARG to beginning of main.
+
+ * tests/Makefile:
+ Makefile doesn't build Posix_SP_Test on VxWorks. The
+ test doesn't compile (which is actually the test for
+ certain #defines).
+
+ * pace/pthread.h:
+ Added #define PACE_PTHREAD_MUTEX_INITIALIZER
+ PTHREAD_MUTEX_INITIALIZER
+
Fri Aug 31 16:48:10 2001 Joe Hoffert <joeh@cs.wustl.edu>
* pace/vxworks/types.h:
diff --git a/PACE/pace/pthread.h b/PACE/pace/pthread.h
index 3e522a2dc19..a744915833d 100644
--- a/PACE/pace/pthread.h
+++ b/PACE/pace/pthread.h
@@ -463,8 +463,6 @@ extern "C" {
int sig);
#endif /* PACE_HAS_POSIX_NONUOF_FUNCS */
- # define PACE_PTHREAD_MUTEX_INITIALIZER PTHREAD_MUTEX_INITIALIZER
-
/**
PACE's implementation of the POSIX function pthread_mutex_destroy.
See POSIX standard (Internation Standard ISO/IEC 9945-1:1996;
diff --git a/PACE/tests/Makefile b/PACE/tests/Makefile
index 5acfd985f6e..7e6a661665b 100644
--- a/PACE/tests/Makefile
+++ b/PACE/tests/Makefile
@@ -11,13 +11,14 @@ CFLAGS += -DPACE_HAS_ALL_POSIX_FUNCS
# Local macros
#----------------------------------------------------------------------------
-# Ensure that POSIX_SP_Test is the last test built. For some platforms,
-# it doesn't build (which is actually the test). This is currently the
-# only file like this (i.e., which may not compile).
-BIN = Stdio_Test \
- Pthreads_Test \
+# Build POSIX_SP_Test conditionally. For some platforms, it doesn't build
+# (which is actually the test of support for the #defines).
+BIN = Cond_Var_Test \
mqueue_test \
- Posix_SP_Test
+ Pthreads_Test \
+ Stdio_Test
+
+BIN2 = Posix_SP_Test
#### If the PACE library wasn't built with all components, don't
#### try to build certain tests.
@@ -34,6 +35,8 @@ ACELIB =
ifdef VXWORKS
ACELIB += -lPACE
LDFLAGS += -L$(PACE_ROOT)/pace/
+else
+ BIN += BIN2
endif
INCLDIRS += -I$(PACE_ROOT)
include $(ACE_ROOT)/include/makeinclude/macros.GNU
diff --git a/PACE/tests/Pthreads_Test.c b/PACE/tests/Pthreads_Test.c
index 04d70ae05c7..055c5af3e25 100644
--- a/PACE/tests/Pthreads_Test.c
+++ b/PACE/tests/Pthreads_Test.c
@@ -71,6 +71,9 @@ join_point (int func1_times, int func2_times)
int
main (int argc, char **argv)
{
+ PACE_UNUSED_ARG (argc);
+ PACE_UNUSED_ARG (argv);
+
/* Test creating a thread. */
pace_pthread_t thread1;
pace_pthread_t thread2;
@@ -92,7 +95,5 @@ main (int argc, char **argv)
join_point(func1_ret, func2_ret);
- PACE_UNUSED_ARG (argc);
- PACE_UNUSED_ARG (argv);
return 0;
}
diff --git a/PACE/tests/vxworks_stub.c b/PACE/tests/vxworks_stub.c
index 920c4c4051f..9155ff19885 100644
--- a/PACE/tests/vxworks_stub.c
+++ b/PACE/tests/vxworks_stub.c
@@ -15,9 +15,12 @@
/* */
/* ===================================================================== */
-# define main pace_main
+# define main post_pace_main
# define PACE_NEEDS_HUGE_THREAD_STACKSIZE 64000
# include /**/ <usrLib.h> /* for ::sp() */
+# include /**/ "pace/pthread.h"
+
+int post_pace_main();
/* This global function can be used from the VxWorks shell to pass
* arguments to a C main () function.
@@ -92,3 +95,16 @@ spa (FUNCPTR entry, ...)
*/
return ret > 0 ? 0 : ret;
}
+
+int
+pace_main(unsigned int argc, char* argv[])
+{
+ /* Setup information for VxWorks emulation */
+ if (pacevx_vxworks_init() == ERROR)
+ return ERROR;
+
+ /* Call the "normal" main function now that we've done
+ * our bookkeeping.
+ */
+ return post_pace_main(argc, argv);
+}