[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: proposed getitimer and setitimer functions

From: Marius Vollmer
Subject: Re: proposed getitimer and setitimer functions
Date: 06 Jul 2001 23:43:42 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.0.102

Rob Browning <address@hidden> writes:

> Is the following implementation of/interface for setitimer OK?  I
> need to add real docs, but in summary, you call it like this:
>   (setitimer which-timer
>              interval-secs interval-microsecs
>              value-secs value-microsecs)
> and it returns a three element list:
>   (result-int
>    (old-timer-interval-secs . old-timer-interval-microsecs)
>    (old-timer-value-secs . old-timer-value-microsecs))

What about collapsing the "secs" and "microsecs" value into one, with
a unit of microseconds.  With bignums, we don't need to use long-hand
for multi-word numbers.

The "result-int" should be interpreted and turned into a
`system-error', I'd say, for consistency with the POSIX functions.

Do we want to use `values' for returning multiple values?

> If all of this is OK (and not to big a change), I'd like to commit it
> now for 1.6.0 which I'll be branching before Sun.

The change is very self-contained and so I don't see a problem with
including it on short notice.

> (Oh, and is there any rule of thumb about when you're supposed to use
>  SCM_VALIDATE_FOO vs just letting scm_foo2bar handle signaling an
>  error?)

Hmm, I'd say that primitives should do type checking as early as
possible since you don't get a backtrace from primitives calling each
other in the backtrace.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]