This is an automated email from the ASF dual-hosted git repository.

cmcfarlen pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/master by this push:
     new 0ca449ca7 aio_thread_main does not have to be static (#9021)
0ca449ca7 is described below

commit 0ca449ca725860c0412b3a64f32f0569383c5e8b
Author: cukiernik <piotr.sieduszew...@intel.com>
AuthorDate: Wed Oct 12 23:37:51 2022 +0200

    aio_thread_main does not have to be static (#9021)
---
 iocore/aio/AIO.cc | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/iocore/aio/AIO.cc b/iocore/aio/AIO.cc
index 9384ed7c6..d76ed0bf0 100644
--- a/iocore/aio/AIO.cc
+++ b/iocore/aio/AIO.cc
@@ -181,11 +181,10 @@ ink_aio_start()
 
 #if AIO_MODE != AIO_MODE_NATIVE
 
-static void *aio_thread_main(void *arg);
-
 struct AIOThreadInfo : public Continuation {
   AIO_Reqs *req;
   int sleep_wait;
+  void *aio_thread_main(AIOThreadInfo *thr_info);
 
   int
   start(int event, Event *e)
@@ -436,12 +435,11 @@ ink_aio_thread_num_set(int thread_num)
 }
 
 void *
-aio_thread_main(void *arg)
+AIOThreadInfo::aio_thread_main(AIOThreadInfo *thr_info)
 {
-  AIOThreadInfo *thr_info = static_cast<AIOThreadInfo *>(arg);
-  AIO_Reqs *my_aio_req    = thr_info->req;
-  AIO_Reqs *current_req   = nullptr;
-  AIOCallback *op         = nullptr;
+  AIO_Reqs *my_aio_req  = thr_info->req;
+  AIO_Reqs *current_req = nullptr;
+  AIOCallback *op       = nullptr;
   ink_mutex_acquire(&my_aio_req->aio_mutex);
   for (;;) {
     do {

Reply via email to