lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <AANLkTimKpVR5UVYLetwt=S4PSkMEJTBpUk7Q-o=ha_ds@mail.gmail.com>
Date:	Mon, 4 Oct 2010 21:39:16 -0400
From:	Philip Wernersbach <philip.wernersbach@...il.com>
To:	linux-kernel@...r.kernel.org
Subject: Detecting runnable process?

I'm writing some kernel code that given a task's task_struct must
decide if it is runnable, and hasn't crashed or exited. So far here's
what I've come up with:

struct task_struct *my_task;
... snip ...
if(likely(my_task != NULL && pid_alive(my_task) == true)) { return my_task; }

Is this correct?

-Phil
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ