move libthreads.h -> include/threads.h
authorBrian Norris <banorris@uci.edu>
Tue, 9 Oct 2012 19:09:02 +0000 (12:09 -0700)
committerBrian Norris <banorris@uci.edu>
Tue, 9 Oct 2012 21:15:16 +0000 (14:15 -0700)
Helps user programs to be able to just use C11 <threads.h>

12 files changed:
include/threads.h [new file with mode: 0644]
libthreads.cc
libthreads.h [deleted file]
main.cc
test/double-relseq.c
test/linuxrwlocks.c
test/pending-release.c
test/releaseseq.c
test/rmwprog.c
test/userprog.c
threads-model.h
threads.cc

diff --git a/include/threads.h b/include/threads.h
new file mode 100644 (file)
index 0000000..641b0cf
--- /dev/null
@@ -0,0 +1,27 @@
+/** @file threads.h
+ *  @brief C11 Thread Library Functionality
+ */
+
+#ifndef __THREADS_H__
+#define __THREADS_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+       typedef void (*thrd_start_t)(void *);
+
+       typedef int thrd_t;
+
+       int thrd_create(thrd_t *t, thrd_start_t start_routine, void *arg);
+       int thrd_join(thrd_t);
+       int thrd_yield(void);
+       thrd_t thrd_current(void);
+
+       int user_main(int, char**);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __THREADS_H__ */
index 9e34141..2b2bf85 100644 (file)
@@ -1,4 +1,4 @@
-#include "libthreads.h"
+#include <threads.h>
 #include "common.h"
 #include "threads-model.h"
 
diff --git a/libthreads.h b/libthreads.h
deleted file mode 100644 (file)
index 8033a12..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/** @file libthreads.h
- *  @brief Basic Thread Library Functionality.
- */
-
-#ifndef __LIBTHREADS_H__
-#define __LIBTHREADS_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-       typedef void (*thrd_start_t)(void *);
-
-       typedef int thrd_t;
-
-       int thrd_create(thrd_t *t, thrd_start_t start_routine, void *arg);
-       int thrd_join(thrd_t);
-       int thrd_yield(void);
-       thrd_t thrd_current(void);
-
-       int user_main(int, char**);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __LIBTHREADS_H__ */
diff --git a/main.cc b/main.cc
index bff111f..6624f06 100644 (file)
--- a/main.cc
+++ b/main.cc
@@ -4,7 +4,7 @@
 
 #include <unistd.h>
 
-#include "libthreads.h"
+#include <threads.h>
 #include "common.h"
 #include "threads-model.h"
 
index 369265a..53147b7 100644 (file)
@@ -11,7 +11,7 @@
 
 #include <stdio.h>
 
-#include "libthreads.h"
+#include <threads.h>
 #include "librace.h"
 #include "stdatomic.h"
 
index a14ed02..ac2fe52 100644 (file)
@@ -1,6 +1,6 @@
 #include <stdio.h>
 
-#include "libthreads.h"
+#include <threads.h>
 #include "librace.h"
 #include "stdatomic.h"
 
index 739c45e..d74dcca 100644 (file)
@@ -7,7 +7,7 @@
 
 #include <stdio.h>
 
-#include "libthreads.h"
+#include <threads.h>
 #include "librace.h"
 #include "stdatomic.h"
 
index 27f2fb1..cbb8ef5 100644 (file)
@@ -6,7 +6,7 @@
 
 #include <stdio.h>
 
-#include "libthreads.h"
+#include <threads.h>
 #include "librace.h"
 #include "stdatomic.h"
 
index a74ae42..5911e5a 100644 (file)
@@ -1,6 +1,6 @@
 #include <stdio.h>
 
-#include "libthreads.h"
+#include <threads.h>
 #include "librace.h"
 #include "stdatomic.h"
 
index b45e8f9..6ad4909 100644 (file)
@@ -1,6 +1,6 @@
 #include <stdio.h>
 
-#include "libthreads.h"
+#include <threads.h>
 #include "librace.h"
 #include "stdatomic.h"
 
index 28d237d..8b165d5 100644 (file)
@@ -10,7 +10,7 @@
 #include <vector>
 
 #include "mymemory.h"
-#include "libthreads.h"
+#include <threads.h>
 #include "modeltypes.h"
 
 /** @brief Represents the state of a user Thread */
index 2ff058f..dc2db2d 100644 (file)
@@ -4,7 +4,7 @@
 
 #include <string.h>
 
-#include "libthreads.h"
+#include <threads.h>
 #include "common.h"
 #include "threads-model.h"