Skip to content

Commit

Permalink
[cilksan][cilkscale] Update to match OpenCilk runtime API changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
neboat committed Aug 23, 2020
1 parent 45ccbc5 commit 4f02a32
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
18 changes: 10 additions & 8 deletions compiler-rt/lib/cilksan/drivercsan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1232,13 +1232,13 @@ struct __cilkrts_worker;

// Wrapped __cilkrts_internal_merge_two_rmaps method for dynamic
// interpositioning.
typedef cilkred_map *(*merge_two_rmaps_t)(__cilkrts_worker *const,
cilkred_map *, cilkred_map *);
typedef cilkred_map *(*merge_two_rmaps_t)(__cilkrts_worker *, cilkred_map *,
cilkred_map *);
static merge_two_rmaps_t dl_merge_two_rmaps = NULL;

CILKSAN_API __attribute__((weak)) cilkred_map *
__cilkrts_internal_merge_two_rmaps(__cilkrts_worker *const ws,
cilkred_map *left, cilkred_map *right) {
__cilkrts_internal_merge_two_rmaps(__cilkrts_worker *ws, cilkred_map *left,
cilkred_map *right) {
if (__builtin_expect(dl_merge_two_rmaps == NULL, 0)) {
dl_merge_two_rmaps = (merge_two_rmaps_t)dlsym(
RTLD_NEXT, "__cilkrts_internal_merge_two_rmaps");
Expand All @@ -1256,17 +1256,19 @@ __cilkrts_internal_merge_two_rmaps(__cilkrts_worker *const ws,
return res;
}

/// Wrapped __cilkrts_internal_merge_two_rmaps method for link-time interpositioning.
/// Wrapped __cilkrts_internal_merge_two_rmaps method for link-time
/// interpositioning.
CILKSAN_API __attribute__((weak)) cilkred_map *
__real___cilkrts_internal_merge_two_rmaps(__cilkrts_worker *const ws,
__real___cilkrts_internal_merge_two_rmaps(__cilkrts_worker *ws,
cilkred_map *left,
cilkred_map *right) {
return __cilkrts_internal_merge_two_rmaps(ws, left, right);
}

CILKSAN_API
cilkred_map *__wrap___cilkrts_internal_merge_two_rmaps(
__cilkrts_worker *const ws, cilkred_map *left, cilkred_map *right) {
cilkred_map *__wrap___cilkrts_internal_merge_two_rmaps(__cilkrts_worker *ws,
cilkred_map *left,
cilkred_map *right) {
disable_checking();
cilkred_map *res = __real___cilkrts_internal_merge_two_rmaps(ws, left, right);
enable_checking();
Expand Down
2 changes: 1 addition & 1 deletion compiler-rt/lib/cilkscale/cilkscale.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
#include <cilk/reducer_ostream.h>
#endif

extern int __cilkrts_get_worker_number(void);
extern unsigned __cilkrts_get_worker_number(void);

///////////////////////////////////////////////////////////////////////////
// Data structures for tracking work and span.
Expand Down

0 comments on commit 4f02a32

Please sign in to comment.