lkml.org 
[lkml]   [2018]   [Mar]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [RFC][PATCH] sched/wait_bit: Introduce wait_var_event()/wake_up_var()
Date
Peter Zijlstra <peterz@infradead.org> wrote:

> Does the below address things sufficiently clear?

Yep.

> +wait_queue_head_t *__var_waitqueue(void *p)
> +{
> + if (BITS_PER_LONG == 64) {
> + unsigned long q = (unsigned long)p;
> +
> + return bit_waitqueue((void *)(q & ~1), q & 1);
> + }
> + return bit_waitqueue(p, 0);
> +}

You might be better off not using bit_waitqueue() but rather do the
calculation directly since you don't actually have a bit number.

David

\
 
 \ /
  Last update: 2018-03-15 15:45    [W:2.375 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site