We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6d42c26 commit de8dd0dCopy full SHA for de8dd0d
Os/Posix/Task.cpp
@@ -32,8 +32,13 @@ namespace Task {
32
PlatformIntType set_stack_size(pthread_attr_t& attributes, const Os::Task::Arguments& arguments) {
33
PlatformIntType status = PosixTaskHandle::SUCCESS;
34
FwSizeType stack = arguments.m_stackSize;
35
- // Check for stack size multiple of page size
+// Check for stack size multiple of page size or skip when the function
36
+// is unavailable.
37
+#ifdef _SC_PAGESIZE
38
long page_size = sysconf(_SC_PAGESIZE);
39
+#else
40
+ long page_size = -1; // Force skip and warning
41
+#endif
42
if (page_size <= 0) {
43
Fw::Logger::log(
44
"[WARNING] %s could not determine page size %s. Skipping stack-size check.\n",
0 commit comments