You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ac...@apache.org on 2017/03/01 20:54:57 UTC
[4/4] qpid-dispatch git commit: DISPATCH-309: Remove dead code
thread-start-handler
DISPATCH-309: Remove dead code thread-start-handler
Not used.
Project: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/commit/408dc105
Tree: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/tree/408dc105
Diff: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/diff/408dc105
Branch: refs/heads/master
Commit: 408dc105e8f79b6f0984f56d5f8f608015033f69
Parents: 7a8c2b9
Author: Alan Conway <ac...@redhat.com>
Authored: Fri Jan 20 12:44:40 2017 -0500
Committer: Alan Conway <ac...@redhat.com>
Committed: Wed Mar 1 13:59:59 2017 -0500
----------------------------------------------------------------------
include/qpid/dispatch/server.h | 29 -----------------------------
router/src/main.c | 10 +---------
src/server.c | 16 ----------------
3 files changed, 1 insertion(+), 54 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/408dc105/include/qpid/dispatch/server.h
----------------------------------------------------------------------
diff --git a/include/qpid/dispatch/server.h b/include/qpid/dispatch/server.h
index dd868a6..80e9c25 100644
--- a/include/qpid/dispatch/server.h
+++ b/include/qpid/dispatch/server.h
@@ -35,21 +35,6 @@
*/
/**
- * Thread Start Handler
- *
- * Callback invoked when a new server thread is started. The callback is
- * invoked on the newly created thread.
- *
- * This handler can be used to set processor affinity or other thread-specific
- * tuning values.
- *
- * @param context The handler context supplied in qd_server_initialize.
- * @param thread_id The integer thread identifier that uniquely identifies this thread.
- */
-typedef void (*qd_thread_start_cb_t)(void* context, int thread_id);
-
-
-/**
* Deferred callback
*
* This type is for calls that are deferred until they can be invoked on
@@ -63,20 +48,6 @@ typedef void (*qd_deferred_t)(void *context, bool discard);
/**
- * Set the optional thread-start handler.
- *
- * This handler is called once on each worker thread at the time the thread is
- * started. This may be used to set tuning settings like processor affinity,
- * etc.
- *
- * @param qd The dispatch handle returned by qd_dispatch.
- * @param start_handler The thread-start handler invoked per thread on thread startup.
- * @param context Opaque context to be passed back in the callback function.
- */
-void qd_server_set_start_handler(qd_dispatch_t *qd, qd_thread_start_cb_t start_handler, void *context);
-
-
-/**
* Run the server threads until completion - The blocking version.
*
* Start the operation of the server, including launching all of the worker
http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/408dc105/router/src/main.c
----------------------------------------------------------------------
diff --git a/router/src/main.c b/router/src/main.c
index 69efb3a..c09b0a8 100644
--- a/router/src/main.c
+++ b/router/src/main.c
@@ -35,13 +35,6 @@ static qd_dispatch_t *dispatch = 0;
static qd_log_source_t *log_source = 0;
static const char* argv0 = 0;
-/**
- * The thread_start_handler is invoked once for each server thread at thread startup.
- */
-static void thread_start_handler(void* context, int thread_id)
-{
-}
-
/**
* This is the OS signal handler, invoked on an undetermined thread at a completely
@@ -116,9 +109,8 @@ static void main_process(const char *config_path, const char *python_pkgdir, int
qd_dispatch_load_config(dispatch, config_path);
check(fd);
- (void)server_signal_handler; (void)thread_start_handler;(void)signal_handler;
+ (void)server_signal_handler; (void)signal_handler;
qd_server_set_signal_handler(dispatch, server_signal_handler, 0);
- qd_server_set_start_handler(dispatch, thread_start_handler, 0);
signal(SIGHUP, signal_handler);
signal(SIGQUIT, signal_handler);
http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/408dc105/src/server.c
----------------------------------------------------------------------
diff --git a/src/server.c b/src/server.c
index 4ba100c..84d0e28 100644
--- a/src/server.c
+++ b/src/server.c
@@ -64,7 +64,6 @@ struct qd_server_t {
const char *sasl_config_name;
qdpn_driver_t *driver;
qd_log_source_t *log_source;
- qd_thread_start_cb_t start_handler;
qd_conn_handler_cb_t conn_handler;
qd_pn_event_handler_cb_t pn_event_handler;
qd_pn_event_complete_cb_t pn_event_complete_handler;
@@ -841,13 +840,6 @@ static void *thread_run(void *arg)
return 0;
//
- // Invoke the start handler if the application supplied one.
- // This handler can be used to set NUMA or processor affinnity for the thread.
- //
- if (qd_server->start_handler)
- qd_server->start_handler(qd_server->start_context, thread->thread_id);
-
- //
// Main Loop
//
while (thread->running) {
@@ -1309,7 +1301,6 @@ qd_server_t *qd_server(qd_dispatch_t *qd, int thread_count, const char *containe
qd_server->sasl_config_path = sasl_config_path;
qd_server->sasl_config_name = sasl_config_name;
qd_server->driver = qdpn_driver(qd_server->log_source);
- qd_server->start_handler = 0;
qd_server->conn_handler = 0;
qd_server->pn_event_handler = 0;
qd_server->signal_handler = 0;
@@ -1380,13 +1371,6 @@ void qd_server_set_signal_handler(qd_dispatch_t *qd, qd_signal_handler_cb_t hand
}
-void qd_server_set_start_handler(qd_dispatch_t *qd, qd_thread_start_cb_t handler, void *context)
-{
- qd->server->start_handler = handler;
- qd->server->start_context = context;
-}
-
-
static void qd_server_announce(qd_server_t* qd_server)
{
qd_log(qd_server->log_source, QD_LOG_INFO, "Operational, %d Threads Running", qd_server->thread_count);
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org