An error occurred fetching the project authors.
- 14 Jun, 2003 1 commit
-
-
Andrew Morton authored
From: george anzinger <george@mvista.com> This patch does the following: Pushs down the change from timeval to timespec in the settime routines. Fixes two places where time was set without updating the monotonic clock offset. (Changes sys_stime() to call do_settimeofday() and changes clock_warp to do the update directly.) These were bugs! Changes the uptime code to use the posix_clock_monotonic notion of uptime instead of the jiffies. This time will track NTP changes and so should be better than your standard wristwatch (if your using ntp). Changes posix_clock_monotonic to start at 0 on boot (was set to start at initial jiffies). Fixes a bug (never experienced) in timer_create() in posix-timers.c where we "could" have released timer_id 0 if "id resources" were low. Adds a test in do_settimeofday() to error out (EINVAL) attempts to use unnormalized times. This is passed back up to both settimeofday and posix_setclock(). Warning: Requires changes in .../arch/???/kernel/time.c to change do_settimeofday() to return an error if time is not normalized and to use a timespec instead of timeval for its input.
-
- 02 Jun, 2003 1 commit
-
-
Jim Houston authored
This adds a new interface to kernel/signal.c which allows signals to be sent using preallocated sigqueue structures. It also modifies kernel/posix-timers.c to use this interface. The current timer code may fail to deliver a timer expiry signal if there are no sigqueue structures available at the time of the expiry. The Posix specification is clear that the signal queuing resource should be allocated at timer_create time. This allows the error to be returned to the application rather than silently losing the signal. This patch does not change the sigqueue structure allocation policy. I hope to revisit that in another patch. Here is the definition for the new interface: struct sigqueue *sigqueue_alloc(void) Preallocate a sigqueue structure for use with the functions described below. void sigqueue_free(struct sigqueue *q) Free a preallocated sigqueue structure. If the sigqueue structure being freed is still queued, it will be removed from the queue. I currently leave the signal pending. It may be delivered without the siginfo structure. int send_sigqueue(int sig, struct sigqueue *q, struct task_struct *p) This function is equivalent to send_sig_info(). It queues a signal to the specified thread using the supplied sigqueue structure. The caller is expected to fill in the siginfo_t which is part of the sigqueue structure. int send_group_sigqueue(int sig, struct sigqueue *q, struct task_struct *p) This function is equivalent to send_group_sig_info(). It queues the signal to a process allowing the system to select which thread will receive the signal in a multi-threaded process. Again, the sigqueue structure is used to queue the signal. Both send_sigqueue() and send_group_sigqueue() return 0 if the signal is queued. They return 1 if the signal was not queued because the process is ignoring the signal. Both versions include code to increment the si_overrun count if the sigqueue entry is for a Posix timer and they are called while the sigqueue entry is still queued. Yes, I know that the current code doesn't rearm the timer until the signal is delivered. Having this extra bit of code doesn't do any harm, and I plan to use it. These routines do not check if there already is a legacy (non-realtime) signal pending. They always queue the signal. This requires that collect_signal() always checks if there is another matching siginfo before clearing the signal bit.
-
- 12 May, 2003 1 commit
-
-
Andrew Morton authored
From: george anzinger <george@mvista.com> - Fix the sig_notify filtering code for the timer_create system call to properly check for the signal number being small enought, but only if SIG_NONE is not specified. - Eliminate useless test of sig_notify.
-
- 20 Apr, 2003 2 commits
-
-
Andrew Morton authored
From: george anzinger <george@mvista.com> In the current system (2.5.67) time_spec to jiffies, time_val to jiffies and the converse (jiffies to time_val and jiffies to time_spec) all use 1/HZ as the measure of a jiffie. Because of the inability of the PIT to actually generate an accurate 1/HZ interrupt, the wall clock is updated with a more accurate value (999848 nanoseconds per jiffie for HZ = 1000). This causes a 1/HZ interpretation of jiffies based timing to run faster than the wall clock, thus causing sleeps and timers to expire short of the requested time. Try, for example: time sleep 60 This patch changes the conversion routines to use the same value as the wall clock update code to do the conversions. The actual math is almost all done at compile time. The run time conversions require little if any more execution time. This patch must be applied after the patch I posted earlier today which fixed the CLOCK_MONOTONIC resolution issue.
-
Andrew Morton authored
The POSIX CLOCK_MONOTONIC currently has only 1/HZ resolution. Further, it is tied to jiffies (i.e. is a restatment of jiffies) rather than "xtime" or the gettimeofday() clock. This patch changes CLOCK_MONOTONIC to be a restatment of gettimeofday() plus an offset to remove any clock setting activity from CLOCK_MONOTONIC. An offset is kept that represents the difference between CLOCK_MONOTONIC and gettimeofday(). This offset is updated when ever the gettimeofday() clock is set to back the clock setting change out of CLOCK_MONOTONIC (which by the standard, can not be set). With this change CLOCK_REALTIME (a direct restatement of gettimeofday()), CLOCK_MONOTONIC and gettimeofday() will all tick at the same time and with the same rate. And all will be affected by NTP adjustments (save those which actually set the time).
-
- 15 Apr, 2003 1 commit
-
-
George Anzinger authored
Clean up "pendcount" locking (or rather - lack there-of) by making it a per-timer thing and thus automatically protected by the timer lock. Fix whitespace damage.
-
- 14 Apr, 2003 1 commit
-
-
Andrew Morton authored
From: george anzinger <george@mvista.com> The MAJOR problem was a hang in the kernel if a user tried to delete a repeating timer that had a signal delivery pending. I was putting the task in a loop waiting for that same task to pick up the signal. OUCH! A minor issue relates to the need by the glibc folks, to specify a particular thread to get the signal. I had this code in all along, but somewhere in 2.5 the signal code was made POSIX compliant, i.e. deliver to the first thread that doesn't have it masked out. This now uses the code from the above mentioned clean up. Most signals go to the group delivery signal code, however, those specifying THREAD_ID (an extension to the POSIX standard) are sent to the specified thread. That thread MUST be in the same thread group as the thread that creates the timer.
-
- 09 Apr, 2003 1 commit
-
-
Linus Torvalds authored
- bad preprocessor test always tested true, even when it shouldn't. - annotate user pointers with proper annotations. Both found by my automatic type checker tool.
-
- 28 Mar, 2003 1 commit
-
-
Andrew Morton authored
From: george anzinger <george@mvista.com> Timer expirations are being reported twice.
-
- 23 Mar, 2003 2 commits
-
-
Ingo Molnar authored
This is a pure identity cleanup: - coding style fixes (whitespace, code, comment, line length cleanups) - remove dead code - simplify constructs, make code more readable
-
Ulrich Drepper authored
It was good to see the syscall return value types being fixed but still some cases are missing. I attach a patch which fixes at least those which cause problems to me in the moment.
-
- 20 Mar, 2003 1 commit
-
-
Andrew Morton authored
The current nanosleep implementation has a signedness problem which can cause it to sleep for 0x7ffffffe jiffies if a clock interrupt happens at the wrong time. The patch fixes that up, and also fixes an wrapping-unsafe 64-bit time comparison. Also uninline tstojiffie(), which has three call sites.
-
- 18 Mar, 2003 1 commit
-
-
Andrew Morton authored
Patch from george anzinger <george@mvista.com> Fix the "large sleep returns EINVAL" problem, and clean a few things up.
-
- 09 Mar, 2003 1 commit
-
-
Linus Torvalds authored
If we raced on a timer expire, we'd get a negative timeout and think that is was a _huge_ positive timeout.
-
- 26 Feb, 2003 1 commit
-
-
Art Haas authored
-
- 22 Feb, 2003 1 commit
-
-
Andi Kleen authored
Fix some annoying warnings that happen on x86-64. - Predeclare pt_regs in binfmts.h. For some reason it isn't included implicitely there. - use unsigned long, not long for interrupt flags in posix-timers.c
-
- 19 Feb, 2003 1 commit
-
-
Andrew Morton authored
Casting a 64-bit address to int, then to unsigned long will truncate it.
-
- 18 Feb, 2003 1 commit
-
-
George Anzinger authored
This is version 23 or so of the POSIX timer code. Internal changelog: - Changed the signals code to match the new order of things. Also the new xtime_lock code needed to be picked up. It made some things a lot simpler. - Fixed a spin lock hand off problem in locking timers (thanks to Randy). - Fixed nanosleep to test for out of bound nanoseconds (thanks to Julie). - Fixed a couple of id deallocation bugs that left old ids laying around (hey I get this one). - This version has a new timer id manager. Andrew Morton suggested elimination of recursion (done) and I added code to allow it to release unused nodes. The prior version only released the leaf nodes. (The id manager uses radix tree type nodes.) Also added is a reuse count so ids will not repeat for at least 256 alloc/ free cycles. - The changes for the new sys_call restart now allow one restart function to handle both nanosleep and clock_nanosleep. Saves a bit of code, nice. - All the requested changes and Lindent too :). - I also broke clock_nanosleep() apart much the same way nanosleep() was with the 2.5.50-bk5 changes. TIMER STORMS The POSIX clocks and timers code prevents "timer storms" by not putting repeating timers back in the timer list until the signal is delivered for the prior expiry. Timer events missed by this delay are accounted for in the timer overrun count. The net result is MUCH lower system overhead while presenting the same info to the user as would be the case if an interrupt and timer processing were required for each increment in the overrun count.
-