diff options
| author | yangwei <[email protected]> | 2023-08-27 16:44:08 +0800 |
|---|---|---|
| committer | yangwei <[email protected]> | 2023-08-28 13:38:18 +0800 |
| commit | 1fcaa1273da7ef29fdc96dddbedc4050e45d07f9 (patch) | |
| tree | adb16cd09ddce23f60a410a4b4ff197c35afcfc7 /include | |
| parent | 7bbf7a8250384fbdcc1ccb74bd4cf3edf22a0b97 (diff) | |
✨ feat(thread_id & pkt->stream): 新增接口,支撑stellar-c需求
1、get_current_worker_thread_id
2、get_streaminfo_from_rawpkt
Diffstat (limited to 'include')
| -rw-r--r-- | include/public/stream_inc/stream_base.h | 3 | ||||
| -rw-r--r-- | include/public/stream_inc/stream_rawpkt.h | 2 |
2 files changed, 5 insertions, 0 deletions
diff --git a/include/public/stream_inc/stream_base.h b/include/public/stream_inc/stream_base.h index b8c27e2..0bf8f55 100644 --- a/include/public/stream_inc/stream_base.h +++ b/include/public/stream_inc/stream_base.h @@ -517,6 +517,9 @@ int get_thread_count(void); time_t get_timestamp_s(void); long long get_timestamp_ms(void); +//if return -1, it means caller not in worker thread context +int get_current_worker_thread_id(); + /* CHN : ����enum addr_type_tַ����ת���ɿɴ�ӡ���ַ�����ʽ */ /* ENG : transform binary addr_type_t to string mode */ const char *addr_type_to_string(enum addr_type_t type); diff --git a/include/public/stream_inc/stream_rawpkt.h b/include/public/stream_inc/stream_rawpkt.h index 07c5152..100c2da 100644 --- a/include/public/stream_inc/stream_rawpkt.h +++ b/include/public/stream_inc/stream_rawpkt.h @@ -111,6 +111,8 @@ const void *MESA_jump_layer(const void *raw_data, int raw_layer_type, int expec const void *get_rawpkt_from_streaminfo(const struct streaminfo *pstream);
+const struct streaminfo *get_streaminfo_from_rawpkt(const void *rawpkt);
+
struct detain_pkt;
struct detain_pkt* MESA_rawpkt_detain(const struct streaminfo *pstream, const void *rawpkt);
int MESA_detain_pkt_forward(struct detain_pkt *pkt);
|
