Project

General

Profile

Actions

Bug #622

closed

cvs commit: src/lib Makefile src/lib/libpthread Makefile README dummy.c

Added by aoiko almost 17 years ago. Updated almost 17 years ago.

Status:
Closed
Priority:
Low
Assignee:
-
Category:
-
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:

Description

On Tuesday 17 April 2007 15:42, Simon 'corecode' Schubert wrote:
[...]

Known issues (of libthread_xu/system):
Mozilla stuff doesn't work. they use sched_get_priority_min/max() and
pthread_setsched_prio(). units disagree (former reporting -20/20, later
expecting 0-32 or so). this has to be streamlined somehow.

Unfortunately I won't have time to do this in the next month because I am
on tour, so I'd be grateful if somebody else could jump in. It's not much
work left!

The first attached patch (lwp_prio) adds a new syscall

int lwp_rtprio (int, pid_t, lwpid_t, struct rtprio *);

that monkeys rtprio(2) and works on lwps. The other patch brings in code from
freebsd (+ some small changes to /not/ silently accept any priority value for
SCHED_OTHER) in libthread_xu, so that now my test program can only set
priority values within sched_get_priority_{min,max} and smaller/larger values
fail. The values are passed on to the kernel using lwp_rtprio() but the
kernel side is not well tested.

Since, AFAICT lwpid can be zero lwp_rtprio() uses pid 0 for "current process"
but lwpid -1 for "current thread", which IMO is ugly. Perhaps we should also
reserve lwpid 0? Alternatively, I can change it to -1 for both. Then again,
very few programs are ever going to use this. Opinions are welcome.

Don't know if this fixes thunderbird; can someone who has it linked against
libpthread switch the symlink and test?

Aggelos


Files

lwp_rtprio.patch (3.47 KB) lwp_rtprio.patch aoiko, 04/30/2007 12:49 PM
xu-schedparams-checkother.patch (9.06 KB) xu-schedparams-checkother.patch aoiko, 04/30/2007 12:49 PM
ktrace.patch (1.21 KB) ktrace.patch josepht, 05/04/2007 07:04 PM
kdump.patch (535 Bytes) kdump.patch josepht, 05/04/2007 07:04 PM
Actions

Also available in: Atom PDF