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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZaPrVWwqkHMj3Bpp@archie.me>
Date: Sun, 14 Jan 2024 21:10:29 +0700
From: Bagas Sanjaya <bagasdotme@...il.com>
To: "Dr. Henning Kopp" <hkopp22@...oo.de>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Linux Power Management <linux-pm@...r.kernel.org>
Cc: Ulf Hansson <ulf.hansson@...aro.org>,
	"Rafael J . Wysocki" <rafael@...nel.org>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Viresh Kumar <viresh.kumar@...aro.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	Alan Stern <stern@...land.harvard.edu>,
	Ingo Molnar <mingo@...nel.org>
Subject: Re: Why does Linux not implement pthread_suspend() and
 pthread_resume()?

[also Cc: linux-pm people]

On Sun, Jan 14, 2024 at 12:20:04PM +0100, Dr. Henning Kopp wrote:
> Hi everyone,
> 
> I have a question regarding pthreads. In particular, I was wondering why
> there is no way to suspend and resume a thread in Linux.
> 
> In Windows, there is SuspendThread() and ResumeThread() from
> processthreadsapi.h. However in Linux, there does not seem to be a similar
> function in pthread.h.
> 
> When researching this issue i found multiple ways to work around the
> inability of suspending a thread, such as using mutexes. But my question is
> why nobody bothered implementing suspending/resuming threads.
> 
> I found one answer on stackoverflow [1] that mentions that pthread_suspend
> and pthread_resume_np is in the "Unix specification", but not implemented in
> Linux. I tried to follow up on this hint and get access to the Posix spec,
> but i am not affiliated with a university anymore, so i was unable to
> download the spec.
> 
> I read "man 7 pthreads". It mentions that there are two Linux
> implementations of Posix threads, that differ in some details from the Posix
> spec. However, it does not mention suspending or resuming threads at all.

LinuxThreads and NPTL?

> 
> I hope this is the right mailing list for my question. If it is off-topic,
> please accept my apologies.
> 
> So my question is: What is the reason that Linux does not implement
> functions for suspending and resuming threads?
> 

Confused...

-- 
An old man doll... just what I always wanted! - Clara

Download attachment "signature.asc" of type "application/pgp-signature" (229 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ