aboutsummaryrefslogtreecommitdiffstats
path: root/stacks/lwip_stack/lwip_src/common/stackx_spl_share.h
diff options
context:
space:
mode:
Diffstat (limited to 'stacks/lwip_stack/lwip_src/common/stackx_spl_share.h')
-rw-r--r--stacks/lwip_stack/lwip_src/common/stackx_spl_share.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/stacks/lwip_stack/lwip_src/common/stackx_spl_share.h b/stacks/lwip_stack/lwip_src/common/stackx_spl_share.h
index 3b0c9f9..2d35dd0 100644
--- a/stacks/lwip_stack/lwip_src/common/stackx_spl_share.h
+++ b/stacks/lwip_stack/lwip_src/common/stackx_spl_share.h
@@ -431,11 +431,23 @@ ss_set_is_listen_conn (spl_netconn_t * sh, i8 is_listen_conn)
}
static inline i32
+ss_inc_fork_ref (spl_netconn_t * sh)
+{
+ return __sync_add_and_fetch (&sh->recycle.fork_ref, 1);
+}
+
+static inline i32
ss_dec_fork_ref (spl_netconn_t * sh)
{
return __sync_sub_and_fetch (&sh->recycle.fork_ref, 1);
}
+static inline i32
+ss_get_fork_ref (spl_netconn_t * sh)
+{
+ return sh->recycle.fork_ref;
+}
+
static inline int
ss_add_pid (spl_netconn_t * sh, pid_t pid)
{