projects
/
mono.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
3df7a2f
)
[sgen] Make hazard pointer stuff work without Mono, enabling concurrent M&S.
author
Mark Probst
<mark.probst@gmail.com>
Sat, 17 Jan 2015 00:30:21 +0000
(16:30 -0800)
committer
Mark Probst
<mark.probst@gmail.com>
Wed, 29 Apr 2015 18:00:09 +0000
(11:00 -0700)
mono/metadata/sgen-client.h
patch
|
blob
|
history
mono/metadata/sgen-gc.c
patch
|
blob
|
history
mono/utils/hazard-pointer.c
patch
|
blob
|
history
mono/utils/lock-free-array-queue.c
patch
|
blob
|
history
mono/utils/monobitset.h
patch
|
blob
|
history
diff --git
a/mono/metadata/sgen-client.h
b/mono/metadata/sgen-client.h
index ad138621541692d008ab3c895387c495c29956c6..b2b5f4adf6aaa22d110579415642478c3d602f20 100644
(file)
--- a/
mono/metadata/sgen-client.h
+++ b/
mono/metadata/sgen-client.h
@@
-273,3
+273,8
@@
void sgen_client_print_gc_debug_usage (void);
#undef TYPE_SIZE
#undef TYPE_POINTER
#undef TYPE_BOOL
#undef TYPE_SIZE
#undef TYPE_POINTER
#undef TYPE_BOOL
+
+#ifdef SGEN_WITHOUT_MONO
+SgenThreadInfo* mono_thread_info_current (void);
+int mono_thread_info_get_small_id (void);
+#endif
diff --git
a/mono/metadata/sgen-gc.c
b/mono/metadata/sgen-gc.c
index 4edfbed3e64acd756f4cd057cfc55055279f8072..3ad4cf78d4ecd0ca8bac5a7a62fd047ee2507bfb 100644
(file)
--- a/
mono/metadata/sgen-gc.c
+++ b/
mono/metadata/sgen-gc.c
@@
-2975,6
+2975,10
@@
sgen_gc_init (void)
SGEN_TV_GETTIME (sgen_init_timestamp);
SGEN_TV_GETTIME (sgen_init_timestamp);
+#ifdef SGEN_WITHOUT_MONO
+ mono_thread_smr_init ();
+#endif
+
LOCK_INIT (gc_mutex);
gc_debug_file = stderr;
LOCK_INIT (gc_mutex);
gc_debug_file = stderr;
diff --git
a/mono/utils/hazard-pointer.c
b/mono/utils/hazard-pointer.c
index 6890db2941ae5bd65f1b7758a67c2ba25432321d..ced9cdad63dc9015800cd2eb38bd621646002df6 100644
(file)
--- a/
mono/utils/hazard-pointer.c
+++ b/
mono/utils/hazard-pointer.c
@@
-6,16
+6,24
@@
#include <config.h>
#include <config.h>
+#include <string.h>
+
#include <mono/utils/hazard-pointer.h>
#include <mono/utils/mono-membar.h>
#include <mono/utils/mono-memory-model.h>
#include <mono/utils/hazard-pointer.h>
#include <mono/utils/mono-membar.h>
#include <mono/utils/mono-memory-model.h>
-#include <mono/utils/mono-mmap.h>
#include <mono/utils/monobitset.h>
#include <mono/utils/monobitset.h>
-#include <mono/utils/mono-threads.h>
#include <mono/utils/lock-free-array-queue.h>
#include <mono/utils/lock-free-array-queue.h>
-#include <mono/utils/mono-counters.h>
#include <mono/utils/atomic.h>
#include <mono/utils/atomic.h>
+#include <mono/utils/mono-mutex.h>
+#ifdef SGEN_WITHOUT_MONO
+#include <mono/metadata/sgen-gc.h>
+#include <mono/metadata/sgen-client.h>
+#else
+#include <mono/utils/mono-mmap.h>
+#include <mono/utils/mono-threads.h>
+#include <mono/utils/mono-counters.h>
#include <mono/io-layer/io-layer.h>
#include <mono/io-layer/io-layer.h>
+#endif
typedef struct {
gpointer p;
typedef struct {
gpointer p;
diff --git
a/mono/utils/lock-free-array-queue.c
b/mono/utils/lock-free-array-queue.c
index fd069a640e32739d44e42c8319c2acc2bb10b769..7742d6555e146a647533cb1a3c7592f7bdec7203 100644
(file)
--- a/
mono/utils/lock-free-array-queue.c
+++ b/
mono/utils/lock-free-array-queue.c
@@
-16,9
+16,16
@@
* entry data, and then sets the state to USED or FREE.
*/
* entry data, and then sets the state to USED or FREE.
*/
+#include <string.h>
+
#include <mono/utils/atomic.h>
#include <mono/utils/mono-membar.h>
#include <mono/utils/atomic.h>
#include <mono/utils/mono-membar.h>
+#ifdef SGEN_WITHOUT_MONO
+#include <mono/metadata/sgen-gc.h>
+#include <mono/metadata/sgen-client.h>
+#else
#include <mono/utils/mono-mmap.h>
#include <mono/utils/mono-mmap.h>
+#endif
#include <mono/utils/lock-free-array-queue.h>
#include <mono/utils/lock-free-array-queue.h>
diff --git
a/mono/utils/monobitset.h
b/mono/utils/monobitset.h
index 5bea9278394d1e7dd1a2f033c71cb2a47517807b..70366f8b1e8602f05c739abd248808c84e31c5fd 100644
(file)
--- a/
mono/utils/monobitset.h
+++ b/
mono/utils/monobitset.h
@@
-2,7
+2,12
@@
#define __MONO_BITSET_H__
#include <glib.h>
#define __MONO_BITSET_H__
#include <glib.h>
+#ifdef SGEN_WITHOUT_MONO
+#include "mono/utils/mono-compiler.h"
+#define MONO_API
+#else
#include <mono/utils/mono-publib.h>
#include <mono/utils/mono-publib.h>
+#endif
/*
* When embedding, you have to define MONO_ZERO_LEN_ARRAY before including any
/*
* When embedding, you have to define MONO_ZERO_LEN_ARRAY before including any