blob: 997438e1a2e2cdfe23d4e060fd566d901ea0e514 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define _GNU_SOURCE /* See feature_test_macros(7) */
#include <dlfcn.h>
#include "wrappedlibs.h"
#include "wrapper.h"
#include "bridge.h"
#include "librarian/library_private.h"
#include "x64emu.h"
#include "debug.h"
#include "myalign.h"
#include "callback.h"
#include "emu/x64emu_private.h"
// Fake the lib for now, don't load it
const char* tbbbindName = "libtbbbind_2_5.so";
#define LIBNAME tbbbind
EXPORT void my___TBB_internal_initialize_system_topology(size_t group, void* numa_code, void* numa_list, void* core_type, void* core_list)
{ }
EXPORT void* my___TBB_internal_allocate_binding_handler(int slot_num, int numa_id, int core_type_id, int max_threads_per_core)
{
// dummy
return NULL;
}
EXPORT void my___TBB_internal_apply_affinity(void* handler, int slot)
{ }
EXPORT void my___TBB_internal_deallocate_binding_handler(void* handler)
{ }
EXPORT void my___TBB_internal_destroy_system_topology()
{ }
int getNCpu();
EXPORT int my___TBB_internal_get_default_concurrency(int numa_id, int core_type, int max_threads_per_core)
{
return getNCpu();
}
EXPORT void my___TBB_internal_restore_affinity(void* handler, int slot)
{ }
// this preinit basically open "box64" as dlopen
#define PRE_INIT\
lib->w.lib = dlopen(NULL, RTLD_LAZY | RTLD_GLOBAL); \
if(0)
#include "wrappedlib_init.h"
|