Skip to content

Commit

Permalink
changing errc to error_code
Browse files Browse the repository at this point in the history
  • Loading branch information
Johan511 committed Jan 24, 2024
1 parent 06a7ef9 commit 2ac50be
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,17 +99,15 @@ namespace hpx::synchronization {
void lock(std::size_t begin, std::size_t end)
{
if (lock_id != 0)
throw std::system_error(
std::errc::resource_deadlock_would_occur,
throw std::system_error(std::error_code(EDEADLK),
"unique_lock::lock: already locked");
lock_id = mutex_ref.get().lock(begin, end);
}

void try_lock(std::size_t begin, std::size_t end)
{
if (lock_id != 0)
throw std::system_error(
std::errc::resource_deadlock_would_occur,
throw std::system_error(std::error_code(EDEADLK),
"unique_lock::lock: already locked");
lock_id = mutex_ref.get().try_lock(begin, end);
}
Expand Down

0 comments on commit 2ac50be

Please sign in to comment.