source: soft/giet_vm/applications/rosenfeld/nrc2/include/nrc_os_config.h @ 821

Last change on this file since 821 was 821, checked in by meunier, 8 years ago
  • Added several versions of rosenfeld: { SLOW, FAST } x { FEATURES, NO_FEATURES }
  • Added native linux compilation support
  • Added a script to check results natively
  • Started to refactor nrc code
File size: 1.2 KB
Line 
1
2
3#define GIETVM 1
4#define LINUX 2
5
6#if TARGET_OS == GIETVM
7    #define printf(...)  giet_tty_printf(__VA_ARGS__)
8
9    #define open(x, y)         giet_fat_open(x, y)
10    #define close(x)           giet_fat_close(x)
11    #define read(x, y, z)      giet_fat_read(x, y, z)
12    #define write(x, y, z)     giet_fat_write(x, y, z)
13    #define fprintf(x, ...)    giet_fat_fprintf(x, __VA_ARGS__)
14    //#define fscanf(x, ...)  ;
15    #define exit(x)            giet_pthread_exit(NULL)
16
17    #define pthread_barrier_t           giet_barrier_t
18    #define pthread_spinlock_t          user_lock_t
19    #define pthread_spin_lock(x)        lock_acquire(x)
20    #define pthread_spin_unlock(x)      lock_release(x)
21    #define pthread_spin_init(x, y)     lock_init(x)
22    #define pthread_mutexlock_t         user_lock_t
23    #define pthread_mutex_lock(x)       lock_acquire(x)
24    #define pthread_mutex_unlock(x)     lock_release(x)
25    #define pthread_mutex_init(x, y)    lock_init(x)
26    #define pthread_barrier_init(x,y,z) barrier_init(x, z)
27    #define pthread_barrier_wait(x)     barrier_wait(x)
28    #define pthread_barrier_destroy(x)
29    #define pthread_create(x,y,z,t)     giet_pthread_create(x,y,z,t)
30    #define pthread_join(x,y)           giet_pthread_join(x,y)
31#endif
32
33
Note: See TracBrowser for help on using the repository browser.