Skip to content

Commit

Permalink
nrf_modem: doc: porting_guide: Semaphore update
Browse files Browse the repository at this point in the history
Semaphores are required also for non-multithreaded access. Remove
the statement that "Semaphores are not required if multithreaded access
to modem functionality is not needed. In this case, the function can
blindly return 0."

Signed-off-by: Eivind Jølsgard <[email protected]>
  • Loading branch information
eivindj-nordic authored and jfischer-no committed Feb 28, 2024
1 parent fcb8aad commit 5dd943e
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions nrf_modem/doc/ug_nrf_modem_porting_os.rst
Original file line number Diff line number Diff line change
Expand Up @@ -243,10 +243,6 @@ This function is called by the library to allocate and initialize a semaphore.
* Allocate and initialize a semaphore.
* If the address of an already allocated semaphore is provided as an input, the allocation part is skipped and the semaphore is only reinitialized.

.. note::
Semaphores are not required if multithreaded access to modem functionalities is not needed.
In this case, the function must blindly return ``0``.

nrf_modem_os_sem_give()
-----------------------

Expand Down Expand Up @@ -392,8 +388,6 @@ You can use it as a starting point and customize it for your OS or scheduler.
* and initialize a semaphore and return its address through the `sem` parameter. If the
* address of an already allocated semaphore is provided as an input, the allocation part is
* skipped and the semaphore is only reinitialized.
* Semaphores are not required if multithreaded access to modem functionalities is not
* needed. In this case, the function must blindly return ``0``.
*/
return 0;
}
Expand Down

0 comments on commit 5dd943e

Please sign in to comment.