Skip to content

Commit

Permalink
Review code
Browse files Browse the repository at this point in the history
  • Loading branch information
gammasoft71 committed Sep 17, 2023
1 parent f7d8548 commit d5d5c94
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
using namespace xtd::native;

intmax_t unnamed_semaphore::create(int_least32_t initial_count, int_least32_t maximum_count) {
semaphore_t semaphore;
auto semaphore = semaphore_t {};
if (semaphore_create(current_task(), &semaphore, SYNC_POLICY_FIFO, std::min(initial_count, maximum_count)) != err_none)
return reinterpret_cast<intmax_t>(SEM_FAILED);
return static_cast<intmax_t>(semaphore);
Expand Down

0 comments on commit d5d5c94

Please sign in to comment.