Skip to content

Conversation

@stgates
Copy link

@stgates stgates commented Jul 2, 2014

This involves basically 3 changes:

  1. Using __declspec(thread) instead of the Tls APIs.
  2. Using Windows::System::Threading since Win32 Threading APIs aren't allowed.
  3. Updating or replacing some banned APIs like WaitForSingleObject with WaitForSingleObjectEx.

This involves basically 3 changes:
1. Using __declspec(thread) instead of the Tls APIs.
2. Using Windows::System::Threading since Win32 Threading APIs aren't allowed.
3. Updating or replacing some banned APIs like WaitForSingleObject with WaitForSingleObjectEx.
@ned14 ned14 self-assigned this Jul 3, 2014
@ned14
Copy link
Member

ned14 commented Jul 3, 2014

I'll try to review this this weekend.

@ned14
Copy link
Member

ned14 commented Jul 3, 2014

BTW do you have a method for building on WinRT? i.e. have you patched Boost.Build for it?

@stgates
Copy link
Author

stgates commented Jul 3, 2014

Yes I have a pending pull request (boostorg/build#14) on Boost.Build for targeting Windows Store and Windows Phone.

Thanks for taking a look,
Steve

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The (C) Microsoft may cause problems for the steering committee. As you will note throughout all Boost code, we don't copyright non-individuals, what happens is that the individual is working for whatever corporate employer but gets approval to personally take the copyright. Would Microsoft be able to give you personally the copyright? I know Eric Niebler used to work for Microsoft, he may be able to advise on what Microsoft channels to use.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I talked again with my legal group and they've agreed to allow the contributions without the Microsoft copyright :). So I removed them from all the source files.

@ned14
Copy link
Member

ned14 commented Jul 5, 2014

If you can clean up the ifdef splosh significantly, this patch looks to be of good enough quality it can be merged. Thanks for taking the effort to submit it.

stgates added 3 commits July 8, 2014 14:53
Reverting disabling thread attributes for WinRT.
Created common GetSystemInfo/GetNativeSystemInfo function.
Fix this_thread get_id() bug on WinRT.
Enabled initializing the Windows Runtime in each test for execution. This
is not when using in Windows store/phone applications, just if a desktop
app.
@stgates
Copy link
Author

stgates commented Jul 9, 2014

Hi Niall,

I think I've addressed all of our comments now. Let me know if you have any additional feedback.

Thanks,
Steve

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume this reorder is due to a bad find in files and replace?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not exactly sure where from but I can fix it back up.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A number of copyright headers seem to have become reordered. Weird. Anyway, apart from that this patch looks good enough for me to try building. Unfortunately for you we have the first beta of Boost v1.56 in the works, and this Saturday will be lost on getting my CI soak testing code for 24 hours and other such fun. If no nasty surprises turn up, I'll get to this the following Saturday, but if I miss that date I'm on a business trip the following weekend so it could potentially be a month out before I get back to this. Is this okay?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll fix up the copyright header ordering.

Greedily from my side the sooner this is in the better :), but I understand. Let me know if I can do anything or you need more information.

@stgates
Copy link
Author

stgates commented Jul 10, 2014

Copyright reordering has been fixed. There is no action on my side now until the GetTickCount64 merges.

stgates added 3 commits July 10, 2014 18:09
Conflicts:
	include/boost/thread/win32/thread_primitives.hpp
	src/win32/gettickcount64.cpp
@stgates
Copy link
Author

stgates commented Jul 18, 2014

Ok I merged with the GetTickCount changes, basically there is no choice but to use GetTickCount64 for the Windows Runtime.

@ned14
Copy link
Member

ned14 commented Jul 19, 2014

Yup seems reasonable. Thanks.

@viboes
Copy link
Collaborator

viboes commented Aug 23, 2014

Niall, could this PR be merged?

@ned14
Copy link
Member

ned14 commented Aug 23, 2014

I have testing it scheduled for the coming Saturday, so one week from today. Today was spent upgrading website software for security bugs, and probably so will tomorrow.

@ned14
Copy link
Member

ned14 commented Aug 30, 2014

I've got this patch compiling, but the tests won't run on my Win8.1 machine (x86). Am I missing something?

b2 libs/thread/test windows-api=store

Performing configuration checks

    - symlinks supported       : no  (cached)
    - junctions supported      : yes (cached)
    - hardlinks supported      : yes (cached)
...patience...
...patience...
...patience...
...found 12368 targets...
...updating 1409 targets...
testing.capture-output bin.v2\libs\thread\test\packaged_task__move_asign_p.test\msvc-12.0\debug\threading-multi\windows-api-store\packaged_task__move_asign_p.run
====== BEGIN OUTPUT ======
The system cannot execute the specified program.

EXIT STATUS: 9020 
====== END OUTPUT ======

@ned14 ned14 merged commit a06dde3 into boostorg:develop Aug 30, 2014
@stgates
Copy link
Author

stgates commented Sep 2, 2014

Thanks for merging.

Yes the tests for WinRT can't run yet because they require the pending changes I have on Boost.Build and Boost.Test. With both of those pull requests the tests can be run.

boostorg/build#26
boostorg/test#9

@ned14
Copy link
Member

ned14 commented Sep 3, 2014

@stgates I merged the Build changes locally, so the above reflects that. Also, I believe Thread mostly uses the lightweight Boost.Test alternative, and therefore doesn't need Boost.Test.

If you look closely at my build log above, it looks to me that the build outputs binaries which cannot run on a 32-bit Windows 8 machine. Perhaps I need x64?

@jgleitsmann
Copy link

Would these versions be compatible with or useable for developing an Xbox app, using the DurangoADK, that has legacy C++ code that needs Boost for threads, signals, ...?

If not, are there any alternatives?

@stgates
Copy link
Author

stgates commented Apr 27, 2015

@jgleitsmann I'm not very familiar for developing for the Xbox, but potentially it could work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants