MXS-1915 Remove unused functions
This commit is contained in:
@ -51,25 +51,6 @@ enum mxs_worker_msg_id
|
|||||||
MXS_WORKER_MSG_CALL
|
MXS_WORKER_MSG_CALL
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
|
||||||
* Return the worker associated with the provided worker id.
|
|
||||||
*
|
|
||||||
* @param worker_id A worker id.
|
|
||||||
*
|
|
||||||
* @return The corresponding worker instance, or NULL if the id does
|
|
||||||
* not correspond to a worker.
|
|
||||||
*/
|
|
||||||
MXS_WORKER* mxs_worker_get(int worker_id);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Return the id of the worker.
|
|
||||||
*
|
|
||||||
* @param worker A worker.
|
|
||||||
*
|
|
||||||
* @return The id of the worker.
|
|
||||||
*/
|
|
||||||
int mxs_worker_id(MXS_WORKER* pWorker);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the current worker.
|
* Return the current worker.
|
||||||
*
|
*
|
||||||
@ -77,13 +58,6 @@ int mxs_worker_id(MXS_WORKER* pWorker);
|
|||||||
*/
|
*/
|
||||||
MXS_WORKER* mxs_worker_get_current();
|
MXS_WORKER* mxs_worker_get_current();
|
||||||
|
|
||||||
/**
|
|
||||||
* Return the id of the worker.
|
|
||||||
*
|
|
||||||
* @return The id of the worker, or -1 if there is no current worker.
|
|
||||||
*/
|
|
||||||
int mxs_worker_get_current_id();
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Post a message to a worker.
|
* Post a message to a worker.
|
||||||
*
|
*
|
||||||
@ -102,26 +76,6 @@ int mxs_worker_get_current_id();
|
|||||||
*/
|
*/
|
||||||
bool mxs_worker_post_message(MXS_WORKER* worker, uint32_t msg_id, intptr_t arg1, intptr_t arg2);
|
bool mxs_worker_post_message(MXS_WORKER* worker, uint32_t msg_id, intptr_t arg1, intptr_t arg2);
|
||||||
|
|
||||||
/**
|
|
||||||
* Broadcast a message to all worker.
|
|
||||||
*
|
|
||||||
* @param msg_id The message id.
|
|
||||||
* @param arg1 Message specific first argument.
|
|
||||||
* @param arg2 Message specific second argument.
|
|
||||||
*
|
|
||||||
* @return The number of messages posted; if less that ne number of workers
|
|
||||||
* then some postings failed.
|
|
||||||
*
|
|
||||||
* @attention The return value tells *only* whether message could be posted,
|
|
||||||
* *not* that it has reached the worker.
|
|
||||||
*
|
|
||||||
* @attentsion Exactly the same arguments are passed to all workers. Take that
|
|
||||||
* into account if the passed data must be freed.
|
|
||||||
*
|
|
||||||
* @attention This function is signal safe.
|
|
||||||
*/
|
|
||||||
size_t mxs_worker_broadcast_message(uint32_t msg_id, intptr_t arg1, intptr_t arg2);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Convert a worker to JSON format
|
* @brief Convert a worker to JSON format
|
||||||
*
|
*
|
||||||
|
@ -16,13 +16,4 @@
|
|||||||
|
|
||||||
MXS_BEGIN_DECLS
|
MXS_BEGIN_DECLS
|
||||||
|
|
||||||
/**
|
|
||||||
* Query whether worker should shutdown.
|
|
||||||
*
|
|
||||||
* @param worker The worker in question.
|
|
||||||
*
|
|
||||||
* @return True, if the worker should shut down, false otherwise.
|
|
||||||
*/
|
|
||||||
bool mxs_worker_should_shutdown(MXS_WORKER* worker);
|
|
||||||
|
|
||||||
MXS_END_DECLS
|
MXS_END_DECLS
|
||||||
|
@ -333,11 +333,6 @@ bool RoutingWorker::remove_shared_fd(int fd)
|
|||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
|
|
||||||
int mxs_worker_id(MXS_WORKER* pWorker)
|
|
||||||
{
|
|
||||||
return static_cast<RoutingWorker*>(pWorker)->id();
|
|
||||||
}
|
|
||||||
|
|
||||||
bool mxs_worker_should_shutdown(MXS_WORKER* pWorker)
|
bool mxs_worker_should_shutdown(MXS_WORKER* pWorker)
|
||||||
{
|
{
|
||||||
return static_cast<RoutingWorker*>(pWorker)->should_shutdown();
|
return static_cast<RoutingWorker*>(pWorker)->should_shutdown();
|
||||||
|
@ -1395,36 +1395,11 @@ json_t* mxs_worker_list_to_json(const char* host)
|
|||||||
return task.resource();
|
return task.resource();
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t mxs_worker_broadcast_message(uint32_t msg_id, intptr_t arg1, intptr_t arg2)
|
|
||||||
{
|
|
||||||
return Worker::broadcast_message(msg_id, arg1, arg2);
|
|
||||||
}
|
|
||||||
|
|
||||||
MXS_WORKER* mxs_worker_get(int worker_id)
|
|
||||||
{
|
|
||||||
return Worker::get(worker_id);
|
|
||||||
}
|
|
||||||
|
|
||||||
MXS_WORKER* mxs_worker_get_current()
|
MXS_WORKER* mxs_worker_get_current()
|
||||||
{
|
{
|
||||||
return Worker::get_current();
|
return Worker::get_current();
|
||||||
}
|
}
|
||||||
|
|
||||||
int mxs_worker_get_current_id()
|
|
||||||
{
|
|
||||||
return Worker::get_current_id();
|
|
||||||
}
|
|
||||||
|
|
||||||
int mxs_worker_id(MXS_WORKER* pWorker)
|
|
||||||
{
|
|
||||||
return static_cast<Worker*>(pWorker)->id();
|
|
||||||
}
|
|
||||||
|
|
||||||
bool mxs_worker_should_shutdown(MXS_WORKER* pWorker)
|
|
||||||
{
|
|
||||||
return static_cast<Worker*>(pWorker)->should_shutdown();
|
|
||||||
}
|
|
||||||
|
|
||||||
bool mxs_worker_post_message(MXS_WORKER* pWorker, uint32_t msg_id, intptr_t arg1, intptr_t arg2)
|
bool mxs_worker_post_message(MXS_WORKER* pWorker, uint32_t msg_id, intptr_t arg1, intptr_t arg2)
|
||||||
{
|
{
|
||||||
return static_cast<Worker*>(pWorker)->post_message(msg_id, arg1, arg2);
|
return static_cast<Worker*>(pWorker)->post_message(msg_id, arg1, arg2);
|
||||||
|
Reference in New Issue
Block a user