Skip to content

Commit

Permalink
Fixing PTHREAD_MIN_STACK for linux
Browse files Browse the repository at this point in the history
  • Loading branch information
LeStarch committed Apr 25, 2024
1 parent 20bb87b commit c858d92
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Os/Posix/Task.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,14 @@ namespace Task {
}

// Clamp invalid stack sizes
if (stack <= PTHREAD_STACK_MIN) {
if (stack <= static_cast<FwSizeType>(PTHREAD_STACK_MIN)) {
Fw::Logger::logMsg(
"[WARNING] %s stack size of %" PRI_FwSizeType " is too small, clamping to %" PRI_FwSizeType "\n",
reinterpret_cast<PlatformPointerCastType>(const_cast<CHAR*>(arguments.m_name.toChar())),
stack,
static_cast<FwSizeType>(PTHREAD_STACK_MIN)
);
stack = PTHREAD_STACK_MIN;
stack = static_cast<FwSizeType>(PTHREAD_STACK_MIN);
}
status = pthread_attr_setstacksize(&attributes, static_cast<PlatformIntType>(stack));
return status;
Expand Down

0 comments on commit c858d92

Please sign in to comment.