public inbox for pthreads-win32@sourceware.org
 help / color / mirror / Atom feed
* Re: Allocating a thread to a specific processor core
@ 2018-05-14 10:29 ross.johnson
  2018-05-14 14:09 ` John Emmas
  0 siblings, 1 reply; 3+ messages in thread
From: ross.johnson @ 2018-05-14 10:29 UTC (permalink / raw)
  To: John Emmas, pthreads-win32

John, 
I notice your question came via the old Red Hat sourceware repository mailing list. The project moved to sourceforge several years ago.
The current head revision at
https://sourceforge.net/p/pthreads4w/wiki/Home/
(code at)
https://sourceforge.net/p/pthreads4w/code/ci/master/tree/
provides the following functions:
pthread_attr_getaffinity_nppthread_attr_setaffinity_nppthread_getaffinity_nppthread_setaffinity_np
and supporting  macros/functions:
CPU_ZEROCPU_EQUALCPU_COUNTCPU_SETCPU_CLRCPU_ISSETCPU_ANDCPU_ORCPU_XOR
They follow the Linux functions of the same name. See the manual pages included in the code repository.
In case you're looking for binary versions of the library,  the Sourceforge project doesn't produce built versions of the library anymore, assuming that users will be able to and prefer to build their own.
RegardsRoss
Sent from my phone
-------- Original message --------From: John Emmas <john@creativepost.co.uk> Date: 14/5/18  6:08 pm  (GMT+10:00) To: pthreads-win32@sourceware.org Subject: Allocating a thread to a specific processor core 
When using 'pthread_create()' (on Windows) is it possible to specify a 
preferred processor/core for the thread to run on (in the attributes maybe?)

Windows itself has a function for doing this but I just wondered if 
there's anything similar that's already available in libpthread?

https://msdn.microsoft.com/en-us/library/windows/desktop/ms686253%28v=vs.85%29.aspx?f=255&MSPPError=-2147217396

Thanks,

John

^ permalink raw reply	[flat|nested] 3+ messages in thread
* Allocating a thread to a specific processor core
@ 2018-05-14  8:08 John Emmas
  0 siblings, 0 replies; 3+ messages in thread
From: John Emmas @ 2018-05-14  8:08 UTC (permalink / raw)
  To: pthreads-win32

When using 'pthread_create()' (on Windows) is it possible to specify a 
preferred processor/core for the thread to run on (in the attributes maybe?)

Windows itself has a function for doing this but I just wondered if 
there's anything similar that's already available in libpthread?

https://msdn.microsoft.com/en-us/library/windows/desktop/ms686253%28v=vs.85%29.aspx?f=255&MSPPError=-2147217396

Thanks,

John

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-05-14 14:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-14 10:29 Allocating a thread to a specific processor core ross.johnson
2018-05-14 14:09 ` John Emmas
  -- strict thread matches above, loose matches on Subject: below --
2018-05-14  8:08 John Emmas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).