Skip to content

pthread: implement mutexattrs and mutex_{get,set}prioceiling#508

Draft
adamgreloch wants to merge 2 commits into
masterfrom
adamgreloch/RTOS-1399
Draft

pthread: implement mutexattrs and mutex_{get,set}prioceiling#508
adamgreloch wants to merge 2 commits into
masterfrom
adamgreloch/RTOS-1399

Conversation

@adamgreloch

Copy link
Copy Markdown
Member

TASK: RTOS-1399

Description

Motivation and Context

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Chore (refactoring, style fixes, git/CI config, submodule management, no code logic changes)

How Has This Been Tested?

  • Already covered by automatic testing.
  • New test added: (add PR link here).
  • Tested by hand on: (list targets here).

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing linter checks and tests passed.
  • My changes generate no new compilation warnings for any of the targets.

Special treatment

  • This PR needs additional PRs to work (list the PRs, preferably in merge-order).
  • I will merge this PR by myself when appropriate.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request implements several POSIX mutex and mutex attribute functions, including priority ceiling, protocol, robustness, and process-shared attributes. The review feedback identifies several critical issues that need to be addressed: missing lazy initialization in pthread_mutex_getprioceiling for statically initialized mutexes, missing NULL pointer checks on mutex and attr arguments across multiple functions that could lead to crashes, duplicate declarations of pthread_mutexattr_gettype and pthread_mutexattr_settype in include/pthread.h, and a trailing semicolon after pthread_mutexattr_getpshared.

Comment thread pthread/pthread.c
Comment thread pthread/pthread.c
Comment thread include/pthread.h
Comment thread pthread/pthread.c
Comment thread pthread/pthread.c Outdated
Comment thread pthread/pthread.c
Comment thread pthread/pthread.c
Comment thread pthread/pthread.c
Comment thread pthread/pthread.c
@adamgreloch
adamgreloch force-pushed the adamgreloch/RTOS-1399 branch from 39ed622 to abb0349 Compare July 21, 2026 17:45
@adamgreloch
adamgreloch force-pushed the adamgreloch/RTOS-1399 branch from abb0349 to 65abd14 Compare July 22, 2026 06:11
@github-actions

Copy link
Copy Markdown

Unit Test Results

11 307 tests  ±0   10 600 ✅ ±0   54m 36s ⏱️ + 1m 15s
   690 suites ±0      707 💤 ±0 
     1 files   ±0        0 ❌ ±0 

Results for commit 65abd14. ± Comparison against base commit fb3245b.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant