summaryrefslogtreecommitdiffstats
path: root/extras/libmemif/src/libmemif.h
diff options
context:
space:
mode:
authorJakub Grajciar <jgrajcia@cisco.com>2021-01-04 10:39:30 +0100
committerDamjan Marion <dmarion@me.com>2021-09-27 14:35:45 +0000
commit45cf1fc3f58ee465d2e7e4689158e79fd706658e (patch)
tree78449dda3a1e6e62344dc1e51e80b50650a89e23 /extras/libmemif/src/libmemif.h
parent9f99e9a60e31f558f9eb5f8e3762d7a97bde67a8 (diff)
libmemif: remove per_thread_ namespace
Type: refactor Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com> Change-Id: Ib5a88132ad28860553fc82f5aaaf84e0a1b8e8bf
Diffstat (limited to 'extras/libmemif/src/libmemif.h')
-rw-r--r--extras/libmemif/src/libmemif.h95
1 files changed, 1 insertions, 94 deletions
diff --git a/extras/libmemif/src/libmemif.h b/extras/libmemif/src/libmemif.h
index 12d2f1e3af4..f9e3dcd09b3 100644
--- a/extras/libmemif/src/libmemif.h
+++ b/extras/libmemif/src/libmemif.h
@@ -23,7 +23,7 @@
#define _LIBMEMIF_H_
/** Libmemif version. */
-#define LIBMEMIF_VERSION "3.1"
+#define LIBMEMIF_VERSION "4.0"
/** Default name of application using libmemif. */
#define MEMIF_DEFAULT_APP_NAME "libmemif-app"
@@ -98,12 +98,6 @@ typedef enum
#define MEMIF_FD_EVENT_MOD (1 << 4)
/** @} */
-/** \brief Memif per thread main handle
- Pointer of type void, pointing to internal structure.
- Used to identify internal per thread database.
-*/
-typedef void *memif_per_thread_main_handle_t;
-
/** \brief Memif connection handle
pointer of type void, pointing to internal structure
*/
@@ -498,28 +492,6 @@ int memif_init (memif_control_fd_update_t * on_control_fd_update,
char *app_name, memif_alloc_t * memif_alloc,
memif_realloc_t * memif_realloc, memif_free_t * memif_free);
-/** \brief Memif per thread initialization
- @param pt_main - per thread main handle
- @param private_ctx - private context
- @param on_control_fd_update - if control fd updates inform user to watch new fd
- @param app_name - application name (will be truncated to 32 chars)
- @param memif_alloc - custom memory allocator, NULL = default
- @param memif_realloc - custom memory reallocation, NULL = default
- @param memif_free - custom memory free, NULL = default
-
- Per thread version of memif_init ().
- Instead of using global database, creates and initializes unique database,
- identified by 'memif_per_thread_main_handle_t'.
-
- \return memif_err_t
-*/
-int memif_per_thread_init (memif_per_thread_main_handle_t * pt_main,
- void *private_ctx,
- memif_control_fd_update_t * on_control_fd_update,
- char *app_name, memif_alloc_t * memif_alloc,
- memif_realloc_t * memif_realloc,
- memif_free_t * memif_free);
-
/** \brief Memif cleanup
Free libmemif internal allocations.
@@ -528,15 +500,6 @@ int memif_per_thread_init (memif_per_thread_main_handle_t * pt_main,
*/
int memif_cleanup ();
-/** \brief Memif per thread cleanup
- @param pt_main - per thread main handle
-
- Free libmemif internal allocations and sets the handle to NULL.
-
- \return memif_err_t
-*/
-int memif_per_thread_cleanup (memif_per_thread_main_handle_t * pt_main);
-
/** \brief Memory interface create function
@param conn - connection handle for client app
@param args - memory interface connection arguments
@@ -585,19 +548,6 @@ int memif_create (memif_conn_handle_t * conn, memif_conn_args_t * args,
*/
int memif_control_fd_handler (int fd, uint8_t events);
-/** \brief Memif per thread control file descriptor handler
- @param pt_main - per thread main handle
- @param fd - file descriptor on which the event occurred
- @param events - event type(s) that occurred
-
- Per thread version of memif_control_fd_handler.
-
- \return memif_err_t
-
-*/
-int memif_per_thread_control_fd_handler (memif_per_thread_main_handle_t
- pt_main, int fd, uint8_t events);
-
/** \brief Memif delete
@param conn - pointer to memif connection handle
@@ -714,13 +664,6 @@ int memif_poll_event (int timeout);
@param pt_main - per thread main handle
@param timeout - timeout in seconds
- Per thread version of memif_poll_event.
-
- \return memif_err_t
-*/
-int memif_per_thread_poll_event (memif_per_thread_main_handle_t pt_main,
- int timeout);
-
/** \brief Send signal to stop concurrently running memif_poll_event().
The function, however, does not wait for memif_poll_event() to stop.
@@ -735,15 +678,6 @@ int memif_per_thread_poll_event (memif_per_thread_main_handle_t pt_main,
*/
#define MEMIF_HAVE_CANCEL_POLL_EVENT 1
int memif_cancel_poll_event ();
-/** \brief Send signal to stop concurrently running memif_poll_event().
- @param pt_main - per thread main handle
-
- Per thread version of memif_cancel_poll_event.
-
- \return memif_err_t
-*/
-int memif_per_thread_cancel_poll_event (memif_per_thread_main_handle_t
- pt_main);
/** \brief Set connection request timer value
@param timer - new timer value
@@ -755,19 +689,6 @@ int memif_per_thread_cancel_poll_event (memif_per_thread_main_handle_t
*/
int memif_set_connection_request_timer (struct itimerspec timer);
-/** \brief Set connection request timer value
- @param pt_main - per thread main handle
- @param timer - new timer value
-
- Per thread version of memif_set_connection_request_timer
-
- \return memif_err_t
-*/
-int
-memif_per_thread_set_connection_request_timer (memif_per_thread_main_handle_t
- pt_main,
- struct itimerspec timer);
-
/** \brief Send connection request
@param conn - memif connection handle
@@ -794,20 +715,6 @@ int memif_request_connection (memif_conn_handle_t conn);
int memif_create_socket (memif_socket_handle_t * sock, const char *filename,
void *private_ctx);
-/** \brief Create memif socket
- @param pt_main - per thread main handle
- @param sock - socket handle for client app
- @param filename - path to socket file
- @param private_ctx - private context
-
- Per thread version of memif_create_socket.
-
- \return memif_err_t
-*/
-int memif_per_thread_create_socket (memif_per_thread_main_handle_t pt_main,
- memif_socket_handle_t * sock,
- const char *filename, void *private_ctx);
-
/** \brief Delete memif socket
@param sock - socket handle for client app