cpu-boosting-monitor: Check return value of eventfd_write and remove useless code 18/298718/4 accepted/tizen/unified/20230914.100402
authorUnsung Lee <unsung.lee@samsung.com>
Wed, 13 Sep 2023 01:51:39 +0000 (10:51 +0900)
committerUnsung Lee <unsung.lee@samsung.com>
Wed, 13 Sep 2023 06:10:54 +0000 (15:10 +0900)
commita95490baad0c5a7436e50c1264b5c3a5ba70b79b
tree0d45c31d15b4d7a129ed7051b86fb33d4cc007b7
parent81dbd6a1b7772ff0b5995a615b6831cdeecfb92d
cpu-boosting-monitor: Check return value of eventfd_write and remove useless code

Check return value of eventfd_write and remove eventfd_read function. This is
because if eventfd_write is not correctly working (return value is -1),
then monitor pthread will not be exited. In addition, eventfd_read is used to
read dummy value, so psi monitor will be exited correctly regardless of eventfd_read.

It solves problems reported by Coverity with cid = 1704480 and cid = 1704688.

Change-Id: Ife5e17998a0edd46e3d7e6ad028d7a0a7285f19a
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
src/resource-optimizer/cpu/cpu-boosting-monitor-psi.c