Project

General

Profile

Actions

Feature #14140

open

timer_create()/timer_settime() could work with thread/proc clocks

Added by Dan McDonald about 2 months ago. Updated about 2 months ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:

Description

This is a followup to #14126 , requesting timer_create() and timer_settime() support.

I'm attaching a primitive test program that uses /dev/random reads and qsort() to juice-up CPU cycles to encourage earlier/later printing events.


Files

OS-5804-t2.c (4.18 KB) OS-5804-t2.c Dan McDonald, 2021-10-06 07:11 PM

Related issues

Blocked by illumos gate - Bug #14126: clock_gettime() could work with thread/proc clocksClosedRobert Mustacchi

Actions
Actions #1

Updated by Dan McDonald about 2 months ago

  • Blocked by Bug #14126: clock_gettime() could work with thread/proc clocks added
Actions #2

Updated by Robert Mustacchi about 2 months ago

So if we want to implement these, the way to do this is basically to make this something that we check in the clock tick handler the same way that we do resource controls and other pieces and use that to deliver the event. I think this is probably fine since existence is tied to your process. However, what we should avoid is probably doing this for clock_getcpuclockid and pthread_getcpuclockid as it suddenly puts a lot of murky questions about what to do when the process / thread exits and it's not your process/thread.

Actions

Also available in: Atom PDF