SPM: Remame the thread function 'thrd_wait_on()'

The thread function 'thrd_wait_on()' actually sets the thread
state to blocked, the name is confusing and may indicate inside
the function CPU is blocked and waits for some signals.

This patch changes the function name to 'thrd_set_wait()'.

Signed-off-by: Mingyang Sun <mingyang.sun@arm.com>
Change-Id: Iad29e2db89f8e5ccb34022506afb3f8c7d188d6b
diff --git a/secure_fw/spm/cmsis_psa/thread.c b/secure_fw/spm/cmsis_psa/thread.c
index eaf6430..5b2cb6e 100644
--- a/secure_fw/spm/cmsis_psa/thread.c
+++ b/secure_fw/spm/cmsis_psa/thread.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018-2021, Arm Limited. All rights reserved.
+ * Copyright (c) 2018-2022, Arm Limited. All rights reserved.
  *
  * SPDX-License-Identifier: BSD-3-Clause
  *
@@ -97,7 +97,7 @@
     return tfm_arch_refresh_hardware_context(pth->p_context_ctrl);
 }
 
-void thrd_wait_on(struct sync_obj_t *p_sync_obj, struct thread_t *pth)
+void thrd_set_wait(struct sync_obj_t *p_sync_obj, struct thread_t *pth)
 {
     TFM_CORE_ASSERT(p_sync_obj && p_sync_obj->magic == THRD_SYNC_MAGIC);
 
diff --git a/secure_fw/spm/cmsis_psa/thread.h b/secure_fw/spm/cmsis_psa/thread.h
index 4c00aab..7a337c7 100644
--- a/secure_fw/spm/cmsis_psa/thread.h
+++ b/secure_fw/spm/cmsis_psa/thread.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018-2021, Arm Limited. All rights reserved.
+ * Copyright (c) 2018-2022, Arm Limited. All rights reserved.
  *
  * SPDX-License-Identifier: BSD-3-Clause
  *
@@ -170,7 +170,7 @@
  *  pth         -    The thread_t which waits on p_sync_obj.
  *
  */
-void thrd_wait_on(struct sync_obj_t *p_sync_obj, struct thread_t *pth);
+void thrd_set_wait(struct sync_obj_t *p_sync_obj, struct thread_t *pth);
 
 /*
  * Wake up the sync object owner thread and set the return value of the function
diff --git a/secure_fw/spm/ffm/backend_ipc.c b/secure_fw/spm/ffm/backend_ipc.c
index 8a0037e..11a4235 100644
--- a/secure_fw/spm/ffm/backend_ipc.c
+++ b/secure_fw/spm/ffm/backend_ipc.c
@@ -121,7 +121,7 @@
      */
 
     if (!is_tfm_rpc_msg(handle)) {
-        thrd_wait_on(&handle->ack_evnt, CURRENT_THREAD);
+        thrd_set_wait(&handle->ack_evnt, CURRENT_THREAD);
     }
 
     return PSA_SUCCESS;
@@ -219,7 +219,7 @@
     ret_signal = p_pt->signals_asserted & signal_mask;
     if (ret_signal == 0) {
         p_pt->signals_waiting = signal_mask;
-        thrd_wait_on(&p_pt->waitobj, CURRENT_THREAD);
+        thrd_set_wait(&p_pt->waitobj, CURRENT_THREAD);
     }
     CRITICAL_SECTION_LEAVE(cs_assert);