aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/global.h
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2012-01-17 12:16:39 +0100
committerSverker Eriksson <[email protected]>2012-02-21 12:22:58 +0100
commit90209e4d57dd9b5ff27729b582f02c3d9e383f72 (patch)
treea91c441699120f0c4fd076cd470754f30a3a9fa1 /erts/emulator/beam/global.h
parent41cf0cb977472a15527b6ac693883daaa84faa5a (diff)
downloadotp-90209e4d57dd9b5ff27729b582f02c3d9e383f72.tar.gz
otp-90209e4d57dd9b5ff27729b582f02c3d9e383f72.tar.bz2
otp-90209e4d57dd9b5ff27729b582f02c3d9e383f72.zip
erts: Multiple export tab's using code_ix
Still blocking code loading
Diffstat (limited to 'erts/emulator/beam/global.h')
-rw-r--r--erts/emulator/beam/global.h50
1 files changed, 4 insertions, 46 deletions
diff --git a/erts/emulator/beam/global.h b/erts/emulator/beam/global.h
index 8745ca610b..4ce6ed5280 100644
--- a/erts/emulator/beam/global.h
+++ b/erts/emulator/beam/global.h
@@ -28,50 +28,7 @@
#include "hash.h"
#include "index.h"
#include "atom.h"
-
-/*SVERK maybe put this is some other header, must be before module.h and export.h */
-#define ERTS_NUM_CODE_IX 3
-typedef unsigned ErtsCodeIndex;
-
-void erts_code_ix_init(void);
-ErtsCodeIndex erts_active_code_ix(void);
-ErtsCodeIndex erts_loader_code_ix(void);
-
-/* Lock code_ix (enqueue and suspend until we get it)
-*/
-void erts_lock_code_ix(void);
-
-/*SVERK
- erts_lock_code_ix();
- wait for thread progress
- (we don't want any retarded threads with pointers to inactive Module)
- Copy active -> loader
- rlock old_code while copying Modules
- Update loader
- wait for thread progress
- (we need a membarrier for everybody to "see" the new code)
- Set loader as new active
- erts_unlock_code_ix();
-}*/
-
-
-/* Unlock code_ix (resume first waiter)
-*/
-void erts_unlock_code_ix(void);
-void erts_start_loader_code_ix(void);
-void erts_commit_loader_code_ix(void);
-void erts_abort_loader_code_ix(void);
-
-void erts_rwlock_old_code(void);
-void erts_rwunlock_old_code(void);
-void erts_rlock_old_code(void);
-void erts_runlock_old_code(void);
-
-#ifdef ERTS_ENABLE_LOCK_CHECK
-int erts_is_old_code_rlocked(void);
-int erts_is_code_ix_locked(void);
-#endif
-
+#include "code_ix.h"
#include "export.h"
#include "module.h"
#include "register.h"
@@ -1529,7 +1486,7 @@ void erts_cleanup_offheap(ErlOffHeap *offheap);
Uint erts_fit_in_bits(Uint);
int list_length(Eterm);
-Export* erts_find_function(Eterm, Eterm, unsigned int);
+Export* erts_find_function(Eterm, Eterm, unsigned int, ErtsCodeIndex);
int erts_is_builtin(Eterm, Eterm, int);
Uint32 make_broken_hash(Eterm);
Uint32 block_hash(byte *, unsigned, Uint32);
@@ -1800,7 +1757,8 @@ extern int erts_call_time_breakpoint_tracing;
int erts_set_trace_pattern(Eterm* mfa, int specified,
Binary* match_prog_set, Binary *meta_match_prog_set,
int on, struct trace_pattern_flags,
- Eterm meta_tracer_pid);
+ Eterm meta_tracer_pid,
+ ErtsCodeIndex);
void
erts_get_default_trace_pattern(int *trace_pattern_is_on,
Binary **match_spec,