pthread: Add logic to disable cancellation points within the OS
authorEunBong Song <eunb.song@samsung.com>
Tue, 2 May 2017 07:57:57 +0000 (16:57 +0900)
committerHeesub Shin <heesub.shin@samsung.com>
Sat, 6 May 2017 14:00:44 +0000 (23:00 +0900)
commit22fd3a12c007ad59bb834db605b24b2df3661b1f
tree445980dd93c1af81a5ba3c6f8c6999528c50feb2
parent89a023a3647f5b3702a27f3e8c389447d95ab522
pthread: Add logic to disable cancellation points within the OS

This is useful when an internal OS function that is NOT a cancellation
point calls an OS function which is a cancellation point. In that case,
irrecoverable states may states may occur if the cancellation is within
the OS.
All credits should go to Juha Niskanen who wrote the original commit.

Change-Id: Iaedfdcf921f4859f049d590e47ab136cb0a0b699
Signed-off-by: Juha Niskanen (Haltian) <juha.niskanen@haltian.com>
[Song: backported b4747286 from Nuttx]
Signed-off-by: EunBong Song <eunb.song@samsung.com>
os/kernel/pthread/pthread.h
os/kernel/pthread/pthread_condtimedwait.c
os/kernel/pthread/pthread_condwait.c