summaryrefslogtreecommitdiff
path: root/gcell/src/include/gc_jd_queue_data.h
diff options
context:
space:
mode:
Diffstat (limited to 'gcell/src/include/gc_jd_queue_data.h')
-rw-r--r--gcell/src/include/gc_jd_queue_data.h27
1 files changed, 5 insertions, 22 deletions
diff --git a/gcell/src/include/gc_jd_queue_data.h b/gcell/src/include/gc_jd_queue_data.h
index e5fa87499..3fd7270d5 100644
--- a/gcell/src/include/gc_jd_queue_data.h
+++ b/gcell/src/include/gc_jd_queue_data.h
@@ -35,31 +35,14 @@ __GC_BEGIN_DECLS
* work. SPE's dequeue from here.
*
* FIXME make it lock free ;) For now, use a spin lock.
+ *
+ * (Fills a single cache line)
*/
-
-typedef struct gc_jd_q_links
-{
- gc_eaddr_t head _AL16;
- gc_eaddr_t tail _AL16;
-} gc_jd_q_links_t;
-
-typedef struct gc_jd_q_mutex
-{
- uint32_t mutex; // libsync mutex (spin lock)
- uint32_t _pad[31]; // pad to cache line so we can use putlluc on SPE
-} _AL128 gc_jd_q_mutex_t;
-
-typedef struct gc_jd_q_flag
-{
- uint32_t flag; // host writes this after enqueuing
- uint32_t _pad[31]; // pad to cache line
-} _AL128 gc_jd_q_flag_t;
-
typedef struct gc_jd_queue
{
- gc_jd_q_links_t l;
- gc_jd_q_mutex_t m;
- gc_jd_q_flag_t f;
+ gc_eaddr_t head _AL16;
+ gc_eaddr_t tail _AL16;
+ uint32_t mutex _AL16; // libsync mutex (spin lock)
} _AL128 gc_jd_queue_t;
__GC_END_DECLS