Skip to content

Commit

Permalink
refactor: add functions to cpp.
Browse files Browse the repository at this point in the history
  • Loading branch information
FGadvancer committed May 18, 2024
1 parent 130caaf commit cc37612
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions cpp/include/wrapp_cpp_function.inc
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
/*
Using C++ template functions and recursion to initialize a function pointer pool,
combined with lambda expressions, this implementation manages function pointers,
achieving acquisition and release of pointers.All wrappers are used to convert
and map C++ functions to C functions, and with the use of indexed locking,
a thread-safe function pointer pool is implemented.For example, the wrapping
functions essentially map C++ functions to C functions. When a C function callback is triggered,
the function pointer pool, initialized through template recursion, locates the corresponding C++ function and invokes it.
*/

#define MAX_NUM_OF_CB_S 10
#define MAX_NUM_OF_CB_I_S 10
#define MAX_NUM_OF_CB_S_I_S_S 10
Expand Down

0 comments on commit cc37612

Please sign in to comment.