public inbox for pthreads-win32@sourceware.org
 help / color / mirror / Atom feed
From: doug sanden <highaspirations@hotmail.com>
To: "pthreads-win32@sourceware.org" <pthreads-win32@sourceware.org>
Subject: windows universal aka uwp
Date: Mon, 02 May 2016 16:38:00 -0000	[thread overview]
Message-ID: <CY1PR14MB0567BCD7FAAED844F87CB631B6790@CY1PR14MB0567.namprd14.prod.outlook.com> (raw)

I got pthread-win32 to work in windows universal on a mobile emulator
Here's my hacked files and uwp/vs2015 project, and see also the TlsFuncs.cpp in the project directory
http://dug9.users.sourceforge.net/web3d/temp/doug_pthreads_uwp_hack_may2_2016.zip

I didn't do thorough tests - just enough to see the app is loading and doing a bit of pthreads.
HTH
-Doug

more..

I hacked pthreads-win32 to get it working on uwp:
- TlsAlloc, Free, Get, Set - weren't in the current WindowsApp.Lib - but are supposed to be in 'Windows 1607' whatever that is
-- so I #ifdefed some in (vs linking to kernel32.lib, which I shouldn't have to do / may mess things up)
- no SetThreadContext, and no LoadProgram, but has QueryUserAPC (not Ex)
- linked with the uwp default WindowsApp.lib only.

more..
Windows universal / uwp means it will run on hand-held devices, laptops, desktops running windows 10
For all the basics, you link to one .lib WindowsApp.lib and it links to all the little libs and at runtime pulls in all the little dlls.

there's a nuget package for pthreads. 
https://github.com/coapp-packages/pthreads
that can be loaded in VisualStudio 2015 and referenced in projects.
But it doesn't work on windows universal uwp, I found. In the nuget package management conditions it filters itself out for uwp apps, if I try and force link and package the dll, on a mobile device it says 'The app failed to start' and 'A dependent dll failed to load'.

https://msdn.microsoft.com/en-us/library/windows/apps/br205757.aspx
- follow the link to UWP, and it has lists for ALL vs EXT
There are 2 classes of APIs, which I'll refer to as ALL and EXT
ALL - guaranteed to be on all win10 uwp devices
EXT- maybe. Maybe not on a specific device. Guard / check.

Here's my hacked files and uwp/vs2015 project, and see also the TlsFuncs.cpp in the project directory
http://dug9.users.sourceforge.net/web3d/temp/doug_pthreads_uwp_hack_may2_2016.zip

                 reply	other threads:[~2016-05-02 16:38 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=CY1PR14MB0567BCD7FAAED844F87CB631B6790@CY1PR14MB0567.namprd14.prod.outlook.com \
    --to=highaspirations@hotmail.com \
    --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).