remove T_USE_SHARED_MEMORY

The T only works when it's TRUE, the version without shared memory
is not supported anymore.
This commit is contained in:
Cedric Roux
2016-05-31 15:47:55 +02:00
parent 655e48c5dc
commit 3a71ecb759
6 changed files with 1 additions and 80 deletions
-32
View File
@@ -127,26 +127,12 @@ extern T_cache_t *T_cache;
#define T_ACTIVE(x) T_active[(intptr_t)x]
#ifdef T_USE_SHARED_MEMORY
#define T_SEND() \
T_cache[T_LOCAL_slot].length = T_LOCAL_size; \
__sync_synchronize(); \
T_cache[T_LOCAL_slot].busy = 1; \
T_send(T_LOCAL_buf, T_LOCAL_size)
#else /* T_USE_SHARED_MEMORY */
/* when not using shared memory, wait for send to finish */
#define T_SEND() \
T_cache[T_LOCAL_slot].length = T_LOCAL_size; \
__sync_synchronize(); \
T_cache[T_LOCAL_slot].busy = 1; \
T_send(T_LOCAL_buf, T_LOCAL_size); \
while (T_cache[T_LOCAL_slot].busy) usleep(1*1000)
#endif /* T_USE_SHARED_MEMORY */
#define T_CHECK_SIZE(len, argnum) \
if (T_LOCAL_size + (len) > T_BUFFER_MAX) { \
printf("%s:%d:%s: cannot put argument %d in T macro, not enough space" \
@@ -575,26 +561,8 @@ extern T_cache_t *T_cache;
} \
} while (0)
#ifndef T_USE_SHARED_MEMORY
#include <stdio.h>
static inline void T_send(char *buf, int size)
{
int i;
return;
printf("sending %d bytes", size);
for (i = 0; i < size; i++)
printf("%s%2.2x", i?" ":"\n", (unsigned char)buf[i]);
printf("\n");
}
#else /* T_USE_SHARED_MEMORY */
#define T_send(...) /**/
#endif /* T_USE_SHARED_MEMORY */
extern int *T_active;
void T_connect_to_tracer(char *addr, int port);