Skip to content

Conversation

@abhijeetk
Copy link
Collaborator

@abhijeetk abhijeetk commented Dec 23, 2025

These changes ensure WidevineTimer follows the same portable pthread
patterns established in commits 9d29311 and 42a3596, and
correctly handles platform-specific pthread_setname_np() semantics on
Apple platforms.

Bug: 432507888
Bug: 438955200
Bug: 471365322

Follow up for commit 9d29311 and 42a3596

Bug: 432507888
Bug: 438955200
@github-actions
Copy link

🤖 Gemini Suggested Commit Message


starboard: Adapt pthread_setname_np for Apple

This change updates WidevineTimer to use std::optional for its thread
handle, aligning with existing portable pthread patterns. It also
introduces platform-specific handling for pthread_setname_np on Apple
platforms, where the function signature differs. This ensures correct
thread naming and overall portability for Widevine's timer mechanism.

Bug: 432507888
Bug: 438955200

💡 Pro Tips for a Better Commit Message:

  1. Influence the Result: Want to change the output? You can write custom prompts or instructions directly in the Pull Request description. The model uses that text to generate the message.
  2. Re-run the Generator: Post a comment with: /generate-commit-message

Copy link
Contributor

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

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 correctly addresses the platform-specific signature of pthread_setname_np() on Apple platforms by using preprocessor directives. The related refactoring of the thread handle thread_ from a raw pthread_t to std::optional<pthread_t> is a welcome improvement, making the code more modern, safer, and more expressive. The logic for thread creation and destruction appears sound. I have one minor suggestion to make the code slightly more idiomatic when using std::optional.

@abhijeetk abhijeetk added runtest Trigger presubmit workflows and removed runtest Trigger presubmit workflows labels Dec 23, 2025
@abhijeetk
Copy link
Collaborator Author

cc : @Gyuyoung @jkim-julie @rakuco

@abhijeetk abhijeetk self-assigned this Dec 24, 2025
@abhijeetk abhijeetk added runtest Trigger presubmit workflows and removed runtest Trigger presubmit workflows labels Dec 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

runtest Trigger presubmit workflows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants