about summary refs log tree commit diff
path: root/src/rt/sync
diff options
context:
space:
mode:
authorJon Morton <jonanin@gmail.com>2012-04-02 22:18:01 -0500
committerBrian Anderson <banderson@mozilla.com>2012-04-03 16:02:38 -0700
commit632a4c9326561de2bd9d9ded19a82f22678a0cf4 (patch)
treee5c5c509b2679cab824819c1d6340e44986d950d /src/rt/sync
parent704ca046a13977175975cb20a77ea2fbac15d77a (diff)
Refactor includes structure, getting rid of rust_internal.h
Many changes to code structure are included:
- removed TIME_SLICE_IN_MS
- removed sychronized_indexed_list
- removed region_owned
- kernel_owned move to kernel.h, task_owned moved to task.h
- global configs moved to rust_globals.h
- changed #pragma once to standard guard in rust_upcall.h
- got rid of memory.h
Diffstat (limited to 'src/rt/sync')
-rw-r--r--src/rt/sync/lock_and_signal.cpp5
-rw-r--r--src/rt/sync/lock_and_signal.h2
-rw-r--r--src/rt/sync/lock_free_queue.h1
-rw-r--r--src/rt/sync/rust_thread.cpp2
-rw-r--r--src/rt/sync/rust_thread.h2
5 files changed, 8 insertions, 4 deletions
diff --git a/src/rt/sync/lock_and_signal.cpp b/src/rt/sync/lock_and_signal.cpp
index 7500a9c3a19..ccc762c2cc9 100644
--- a/src/rt/sync/lock_and_signal.cpp
+++ b/src/rt/sync/lock_and_signal.cpp
@@ -1,5 +1,6 @@
-#include <assert.h>
+
 #include "../rust_globals.h"
+#include "lock_and_signal.h"
 
 /*
  * A "lock-and-signal" pair. These are necessarily coupled on pthreads
@@ -8,8 +9,6 @@
  * if you're using a pthreads cvar+mutex pair.
  */
 
-#include "lock_and_signal.h"
-
 // FIXME: This is not a portable way of specifying an invalid pthread_t
 #define INVALID_THREAD 0
 
diff --git a/src/rt/sync/lock_and_signal.h b/src/rt/sync/lock_and_signal.h
index fae9b1c24ea..927b0c5b0ff 100644
--- a/src/rt/sync/lock_and_signal.h
+++ b/src/rt/sync/lock_and_signal.h
@@ -2,6 +2,8 @@
 #ifndef LOCK_AND_SIGNAL_H
 #define LOCK_AND_SIGNAL_H
 
+#include "rust_globals.h"
+
 #ifndef RUST_NDEBUG
 #define DEBUG_LOCKS
 #endif
diff --git a/src/rt/sync/lock_free_queue.h b/src/rt/sync/lock_free_queue.h
index 377dd93e34e..3ee15d5d3a6 100644
--- a/src/rt/sync/lock_free_queue.h
+++ b/src/rt/sync/lock_free_queue.h
@@ -42,6 +42,7 @@
  */
 
 #include <assert.h>
+
 template <class T>
 class lock_free_queue {
 
diff --git a/src/rt/sync/rust_thread.cpp b/src/rt/sync/rust_thread.cpp
index 6937f4f7811..5d533acde3d 100644
--- a/src/rt/sync/rust_thread.cpp
+++ b/src/rt/sync/rust_thread.cpp
@@ -1,4 +1,4 @@
-#include "rust_globals.h"
+
 #include "rust_thread.h"
 
 const size_t default_stack_sz = 1024*1024;
diff --git a/src/rt/sync/rust_thread.h b/src/rt/sync/rust_thread.h
index 1a483b658c0..56cf85d4660 100644
--- a/src/rt/sync/rust_thread.h
+++ b/src/rt/sync/rust_thread.h
@@ -1,6 +1,8 @@
 #ifndef RUST_THREAD_H
 #define RUST_THREAD_H
 
+#include "rust_globals.h"
+
 /**
  * Thread utility class. Derive and implement your own run() method.
  */