Implement a semaphore primitive 32/244732/9
authorWander Lairson Costa <wander.lairson@gmail.com>
Mon, 21 Sep 2020 20:03:52 +0000 (17:03 -0300)
committerAdeel Kazmi <adeel.kazmi@samsung.com>
Mon, 23 Nov 2020 12:41:14 +0000 (12:41 +0000)
commit43721e2c7b4b4eb9541ad7b16155cc41cf10c021
tree9211af6734429436ffbc5c64d01a6e6841b99395
parentddfbb63efa75d908711a0a90ab3db9b053c55a9a
Implement a semaphore primitive

macOS doesn't implement unnamed POSIX semaphores (sem_*) and semaphores
is only available in the standard C++ library starting with C++20.

We implement a semaphore primitive that tries to mimic as much as
possible std::counting_semaphore, this way when we enable C++20 in the
code base we can easily migrate to the standard implementation.

Change-Id: Ifab8dbe41b57490564ad569cf53d6aa0c4100a13
automated-tests/src/dali/CMakeLists.txt
automated-tests/src/dali/dali-test-suite-utils/dali-test-suite-utils.h
automated-tests/src/dali/utc-Dali-Semaphore.cpp [new file with mode: 0644]
dali/devel-api/file.list
dali/devel-api/threading/semaphore.h [new file with mode: 0644]