Skip to content

Commit

Permalink
lib UPDATE server terminate function
Browse files Browse the repository at this point in the history
  • Loading branch information
michalvasko committed Jun 4, 2024
1 parent 00ce3ad commit 501f186
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,12 @@ if(NETOPEER2_LIB_SERVER)
* @return EXIT_SUCCESS on success.
* @return EXIT_FAILURE on error.
*/
int np2_server(int argc, char *argv[]);")
int np2_server(int argc, char *argv[]);
/**
* @brief netopeer2-server terminate function.
*/
void np2_server_terminate(void);")
endif()

if(NETOPEER2_LIB_TESTS)
Expand Down
9 changes: 9 additions & 0 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,15 @@ ATOMIC_T loop_continue = 1;

static void *worker_thread(void *arg);

/**
* @brief netopeer2 lib terminate function, unused in the binary.
*/
void
np2_server_terminate(void)
{
ATOMIC_STORE_RELAXED(loop_continue, 0);
}

#ifdef HAVE_SIGACTION

/**
Expand Down

0 comments on commit 501f186

Please sign in to comment.