aboutsummaryrefslogtreecommitdiffstats
path: root/stacks/rsocket/src/rsocket_adpt.h
diff options
context:
space:
mode:
Diffstat (limited to 'stacks/rsocket/src/rsocket_adpt.h')
-rw-r--r--stacks/rsocket/src/rsocket_adpt.h31
1 files changed, 15 insertions, 16 deletions
diff --git a/stacks/rsocket/src/rsocket_adpt.h b/stacks/rsocket/src/rsocket_adpt.h
index 43ec6cf..9c53330 100644
--- a/stacks/rsocket/src/rsocket_adpt.h
+++ b/stacks/rsocket/src/rsocket_adpt.h
@@ -20,12 +20,13 @@
#include "indexer.h"
#include "rsocket_rdma.h"
-enum {
- RR_STAT_EPW_ERR,
- RR_STAT_EPW_EINTR,
- RR_STAT_EPW_ETIMEOUT,
+enum
+{
+ RR_STAT_EPW_ERR,
+ RR_STAT_EPW_EINTR,
+ RR_STAT_EPW_ETIMEOUT,
- RR_STAT_NUM
+ RR_STAT_NUM
};
#define RR_STAT_ADD(id, num) __sync_add_and_fetch(&g_rr_var.stat[(id)], num)
@@ -35,21 +36,19 @@ enum {
#define RSRDMA_EXIT 1
-typedef struct rsocket_var {
- pthread_t epoll_threadid;
+typedef struct rsocket_var
+{
+ pthread_t epoll_threadid;
- int epfd;
- int type;
- int (*event_cb) (void *pdata, int events);
+ int epfd;
+ int type;
+ int (*event_cb) (void *pdata, int events);
- uint64_t stat[RR_STAT_NUM];
+ uint64_t stat[RR_STAT_NUM];
} rsocket_var_t;
extern rsocket_var_t g_rr_var;
+int rr_rs_handle (int fd, uint32_t events);
-int rr_rs_handle(int fd, uint32_t events);
-
-
-#endif/* #ifndef _RSOCKET_ADPT_H_ */
-
+#endif /* #ifndef _RSOCKET_ADPT_H_ */