On Fri, 15 Jun 2007 14:54:20 -0500
"David M. Lloyd" <[EMAIL PROTECTED]> wrote:
> On Fri, 15 Jun 2007 21:47:50 +0200 (CEST)
> Jan Engelhardt <[EMAIL PROTECTED]> wrote:
>
> > On Jun 15 2007 18:56, Vegard Nossum wrote:
> > > bool is_power_of_2(unsigned
On Fri, 15 Jun 2007 21:47:50 +0200 (CEST)
Jan Engelhardt <[EMAIL PROTECTED]> wrote:
> On Jun 15 2007 18:56, Vegard Nossum wrote:
> > bool is_power_of_2(unsigned long n)
> > {
> >-return (n != 0 && ((n & (n - 1)) == 0));
> >+return n * !(n & (n - 1));
> > }
>
> There is a third way which
On Fri, 15 Jun 2007 21:47:50 +0200 (CEST)
Jan Engelhardt [EMAIL PROTECTED] wrote:
On Jun 15 2007 18:56, Vegard Nossum wrote:
bool is_power_of_2(unsigned long n)
{
-return (n != 0 ((n (n - 1)) == 0));
+return n * !(n (n - 1));
}
There is a third way which uses neither * nor
On Fri, 15 Jun 2007 14:54:20 -0500
David M. Lloyd [EMAIL PROTECTED] wrote:
On Fri, 15 Jun 2007 21:47:50 +0200 (CEST)
Jan Engelhardt [EMAIL PROTECTED] wrote:
On Jun 15 2007 18:56, Vegard Nossum wrote:
bool is_power_of_2(unsigned long n)
{
- return (n != 0 ((n (n - 1)) == 0
On Wed, 30 May 2007 14:27:52 -0700 (PDT)
Linus Torvalds <[EMAIL PROTECTED]> wrote:
> Well, don't think of it as a special case at all: think of bit 30 as
> a "the user asked for a non-linear fd".
If the sole point is to protect an fd from being closed or operated on
outside of a certain context,
On Wed, 30 May 2007 14:27:52 -0700 (PDT)
Linus Torvalds [EMAIL PROTECTED] wrote:
Well, don't think of it as a special case at all: think of bit 30 as
a the user asked for a non-linear fd.
If the sole point is to protect an fd from being closed or operated on
outside of a certain context, why
On Wed, 2007-05-02 at 16:30 -0600, Chris Friesen wrote:
> Glen Turner wrote:
>
> > The question is, how can a process with no relationship to another
> > process detect that process unexpectedly dying? If named goes
> > away to a better place, we want to shut down the interface
> > which causes
On Wed, 2007-05-02 at 16:30 -0600, Chris Friesen wrote:
Glen Turner wrote:
The question is, how can a process with no relationship to another
process detect that process unexpectedly dying? If named goes
away to a better place, we want to shut down the interface
which causes Quagga to
On Tue, 2007-03-13 at 02:24 +, Alan Cox wrote:
> > purports to handle short writes but has never been exercised is
> > arguably worse than code that simply bombs on short write. So if I
> > can't shim in an induce-short-writes-randomly-on-purpose mechanism
> > during development, I don't want
On Tue, 2007-03-13 at 02:24 +, Alan Cox wrote:
purports to handle short writes but has never been exercised is
arguably worse than code that simply bombs on short write. So if I
can't shim in an induce-short-writes-randomly-on-purpose mechanism
during development, I don't want short
On Wed, 2007-03-07 at 17:21 -0800, Davide Libenzi wrote:
> int signalfd_dequeue(int fd, siginfo_t *info, long timeo);
>
> The "fd" parameter must ba a signalfd file descriptor. The "info" parameter
> is a pointer to the siginfo that will receive the dequeued signal, and
> "timeo" is a timeout in
On Wed, 2007-03-07 at 17:21 -0800, Davide Libenzi wrote:
int signalfd_dequeue(int fd, siginfo_t *info, long timeo);
The fd parameter must ba a signalfd file descriptor. The info parameter
is a pointer to the siginfo that will receive the dequeued signal, and
timeo is a timeout in
On Tue, 2007-03-06 at 08:31 -0800, David Brown wrote:
> +#define __KERNEL__
That's a #define, not an #ifdef...
- DML
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at
On Tue, 2007-03-06 at 08:31 -0800, David Brown wrote:
+#define __KERNEL__
That's a #define, not an #ifdef...
- DML
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at
On Thu, 2007-02-01 at 13:12 +0300, Evgeniy Polyakov wrote:
> Generic event handling mechanism.
The patch applied cleanly to 2.6.20 final, but I got a build error:
CC kernel/kevent/kevent.o
CC kernel/kevent/kevent_user.o
CC kernel/kevent/kevent_timer.o
CC
On Thu, 2007-02-01 at 13:12 +0300, Evgeniy Polyakov wrote:
Generic event handling mechanism.
The patch applied cleanly to 2.6.20 final, but I got a build error:
CC kernel/kevent/kevent.o
CC kernel/kevent/kevent_user.o
CC kernel/kevent/kevent_timer.o
CC
16 matches
Mail list logo