整理目录结构,调整框架部分实现,初步编译通过。
This commit is contained in:
17
common/include/tfe_utils.h
Normal file
17
common/include/tfe_utils.h
Normal file
@@ -0,0 +1,17 @@
|
||||
//#define ALLOC(t,n) (t *)calloc(sizeof(t),(n))
|
||||
|
||||
/* Allocates an array of objects using malloc() */
|
||||
#define ALLOC(type, number) \
|
||||
((type *)calloc(sizeof(type), number))
|
||||
|
||||
#define likely(expr) __builtin_expect((expr), 1)
|
||||
#define unlikely(expr) __builtin_expect((expr), 0)
|
||||
|
||||
int addr_sock_to_layer(struct sockaddr * sock_addr, int sockaddrlen, struct layer_addr * layer_addr);
|
||||
int addr_layer_to_sock(struct layer_addr * layer_addr, struct sockaddr * sock_addr);
|
||||
char* tfe_strdup(const char* s);
|
||||
|
||||
|
||||
#define TFE_LOG_ERROR
|
||||
#define TFE_LOG_INFO
|
||||
#define TFE_LOG_DEBUG
|
||||
Reference in New Issue
Block a user