public inbox for pthreads-win32@sourceware.org
 help / color / mirror / Atom feed
From: "ross.johnson" <ross.johnson@loungebythelake.net>
To: John Emmas <john@creativepost.co.uk>, pthreads-win32@sourceware.org
Subject: Re: Allocating a thread to a specific processor core
Date: Mon, 14 May 2018 10:29:00 -0000	[thread overview]
Message-ID: <qxvlqlv1yqv52vkr5bf8rleh.1526293769816@email.android.com> (raw)

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

             reply	other threads:[~2018-05-14 10:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-14 10:29 ross.johnson [this message]
2018-05-14 14:09 ` John Emmas
  -- strict thread matches above, loose matches on Subject: below --
2018-05-14  8:08 John Emmas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=qxvlqlv1yqv52vkr5bf8rleh.1526293769816@email.android.com \
    --to=ross.johnson@loungebythelake.net \
    --cc=john@creativepost.co.uk \
    --cc=pthreads-win32@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).