diff options
author | Swarup Nayak <swarupnpvt@gmail.com> | 2018-08-13 19:23:34 +0530 |
---|---|---|
committer | Swarup Nayak <swarupnpvt@gmail.com> | 2018-08-13 19:25:27 +0530 |
commit | 7dc65518819f2b453fd2837e92c115592d8832ec (patch) | |
tree | f9119bb3624ff11af480981c9904b84c172a607c /stacks/rsocket/src/rsocket_adpt.h | |
parent | bd6e75c243db1b384ba0882ecaf9063ec4cd70bd (diff) |
Feat : LWIP integration part1
Change-Id: Ia26c092d16579c6f845a021ba66bde106363883a
Signed-off-by: Swarup Nayak <swarupnpvt@gmail.com>
Diffstat (limited to 'stacks/rsocket/src/rsocket_adpt.h')
-rw-r--r-- | stacks/rsocket/src/rsocket_adpt.h | 31 |
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_ */ |