[Mingw-w64-public] [PATCH] kernel32.def: Add missing WaitOnAddress & WakeByAddress*
--- mingw-w64-crt/lib32/kernel32.def| 3 +++ mingw-w64-crt/lib64/kernel32.def| 3 +++ mingw-w64-crt/libarm32/kernel32.def | 3 +++ 3 files changed, 9 insertions(+) diff --git a/mingw-w64-crt/lib32/kernel32.def b/mingw-w64-crt/lib32/kernel32.def index 0435d8d..aa834c6 100644 --- a/mingw-w64-crt/lib32/kernel32.def +++ b/mingw-w64-crt/lib32/kernel32.def @@ -1240,7 +1240,10 @@ WaitForThreadpoolWaitCallbacks@8 WaitForThreadpoolWorkCallbacks@8 WaitNamedPipeA@8 WaitNamedPipeW@8 +WaitOnAddress@16 WakeAllConditionVariable@4 +WakeByAddressSingle@4 +WakeByAddressAll@4 WakeConditionVariable@4 WerGetFlags@8 WerRegisterFile@12 diff --git a/mingw-w64-crt/lib64/kernel32.def b/mingw-w64-crt/lib64/kernel32.def index ef65905..47a5551 100644 --- a/mingw-w64-crt/lib64/kernel32.def +++ b/mingw-w64-crt/lib64/kernel32.def @@ -1344,7 +1344,10 @@ WaitForThreadpoolWaitCallbacks WaitForThreadpoolWorkCallbacks WaitNamedPipeA WaitNamedPipeW +WaitOnAddress WakeAllConditionVariable +WakeByAddressSingle +WakeByAddressAll WakeConditionVariable WerGetFlags WerRegisterFile diff --git a/mingw-w64-crt/libarm32/kernel32.def b/mingw-w64-crt/libarm32/kernel32.def index 90ead6b..6846082 100644 --- a/mingw-w64-crt/libarm32/kernel32.def +++ b/mingw-w64-crt/libarm32/kernel32.def @@ -1464,7 +1464,10 @@ WaitForThreadpoolWaitCallbacks WaitForThreadpoolWorkCallbacks WaitNamedPipeA WaitNamedPipeW +WaitOnAddress WakeAllConditionVariable +WakeByAddressSingle +WakeByAddressAll WakeConditionVariable WerGetFlags WerRegisterFile -- 2.8.1 -- What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic patterns at an interface-level. Reveals which users, apps, and protocols are consuming the most bandwidth. Provides multi-vendor support for NetFlow, J-Flow, sFlow and other flows. Make informed decisions using capacity planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e ___ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
Re: [Mingw-w64-public] [PATCH] kernel32.def: Add missing WaitOnAddress & WakeByAddress*
On 05/31/2016 02:12 PM, Hugo Beauzée-Luyssen wrote: > --- > mingw-w64-crt/lib32/kernel32.def| 3 +++ > mingw-w64-crt/lib64/kernel32.def| 3 +++ > mingw-w64-crt/libarm32/kernel32.def | 3 +++ > 3 files changed, 9 insertions(+) > > diff --git a/mingw-w64-crt/lib32/kernel32.def > b/mingw-w64-crt/lib32/kernel32.def > index 0435d8d..aa834c6 100644 > --- a/mingw-w64-crt/lib32/kernel32.def > +++ b/mingw-w64-crt/lib32/kernel32.def > @@ -1240,7 +1240,10 @@ WaitForThreadpoolWaitCallbacks@8 > WaitForThreadpoolWorkCallbacks@8 > WaitNamedPipeA@8 > WaitNamedPipeW@8 > +WaitOnAddress@16 > WakeAllConditionVariable@4 > +WakeByAddressSingle@4 > +WakeByAddressAll@4 > WakeConditionVariable@4 > WerGetFlags@8 > WerRegisterFile@12 > diff --git a/mingw-w64-crt/lib64/kernel32.def > b/mingw-w64-crt/lib64/kernel32.def > index ef65905..47a5551 100644 > --- a/mingw-w64-crt/lib64/kernel32.def > +++ b/mingw-w64-crt/lib64/kernel32.def > @@ -1344,7 +1344,10 @@ WaitForThreadpoolWaitCallbacks > WaitForThreadpoolWorkCallbacks > WaitNamedPipeA > WaitNamedPipeW > +WaitOnAddress > WakeAllConditionVariable > +WakeByAddressSingle > +WakeByAddressAll > WakeConditionVariable > WerGetFlags > WerRegisterFile > diff --git a/mingw-w64-crt/libarm32/kernel32.def > b/mingw-w64-crt/libarm32/kernel32.def > index 90ead6b..6846082 100644 > --- a/mingw-w64-crt/libarm32/kernel32.def > +++ b/mingw-w64-crt/libarm32/kernel32.def > @@ -1464,7 +1464,10 @@ WaitForThreadpoolWaitCallbacks > WaitForThreadpoolWorkCallbacks > WaitNamedPipeA > WaitNamedPipeW > +WaitOnAddress > WakeAllConditionVariable > +WakeByAddressSingle > +WakeByAddressAll > WakeConditionVariable > WerGetFlags > WerRegisterFile > Please ignore this, I'll send a working patch soon -- What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic patterns at an interface-level. Reveals which users, apps, and protocols are consuming the most bandwidth. Provides multi-vendor support for NetFlow, J-Flow, sFlow and other flows. Make informed decisions using capacity planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e ___ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
[Mingw-w64-public] [PATCH] Add a libsynchronization.a
This exposes the WaitOnAddress, WakeByAddressAll and WakeByAddressSingle functions Adding those to kernel32.lib fails at runtime --- mingw-w64-crt/Makefile.am| 20 ++-- mingw-w64-crt/lib32/Makefile.am | 1 + mingw-w64-crt/lib32/api-ms-win-core-synch-l1-2-0.def | 5 + mingw-w64-crt/lib32/synchronization.mri | 4 mingw-w64-crt/lib64/api-ms-win-core-synch-l1-2-0.def | 5 + mingw-w64-crt/lib64/synchronization.mri | 4 .../libarm32/api-ms-win-core-synch-l1-2-0.def| 5 + mingw-w64-crt/libarm32/kernel32.def | 3 +++ 8 files changed, 45 insertions(+), 2 deletions(-) create mode 100644 mingw-w64-crt/lib32/api-ms-win-core-synch-l1-2-0.def create mode 100644 mingw-w64-crt/lib32/synchronization.mri create mode 100644 mingw-w64-crt/lib64/api-ms-win-core-synch-l1-2-0.def create mode 100644 mingw-w64-crt/lib64/synchronization.mri create mode 100644 mingw-w64-crt/libarm32/api-ms-win-core-synch-l1-2-0.def diff --git a/mingw-w64-crt/Makefile.am b/mingw-w64-crt/Makefile.am index 0bfbb26..9c31cdb 100644 --- a/mingw-w64-crt/Makefile.am +++ b/mingw-w64-crt/Makefile.am @@ -642,6 +642,11 @@ lib32/libruntimeobject.a: lib32/runtimeobject.mri lib32/libapi-ms-win-core-winrt $(AR) -M < $< $(RANLIB) $@ +lib32/libsynchronization.a: lib32/synchronization.mri lib32/libapi-ms-win-core-synch-l1-2-0.a + rm -f $@ + $(AR) -M < $< + $(RANLIB) $@ + dx32_DATA = dx32_DATA += lib32/libxinput.a dx32_DATA += lib32/libxapofx.a @@ -1145,7 +1150,8 @@ lib64_DATA = \ lib64/libxaudio2_8.a lib64/libd3dcompiler_46.a lib64/libd3dcsx_46.a \ lib64/libd3d11.a lib64/libd3dcompiler_47.a \ lib64/libwinhttp.a \ - lib64/libruntimeobject.a + lib64/libruntimeobject.a \ + lib64/libsynchronization.a if !W32API lib64_DATA += lib64/libmsvcp60.a lib64/libmsvcr80.a lib64/libmsvcr90.a lib64/libmsvcr100.a lib64/libmsvcr90d.a \ @@ -1173,6 +1179,11 @@ lib64/libruntimeobject.a: lib64/runtimeobject.mri lib64/libapi-ms-win-core-winrt $(AR) -M < $< $(RANLIB) $@ +lib64/libsynchronization.a: lib64/synchronization.mri lib64/libapi-ms-win-core-synch-l1-2-0.a + rm -f $@ + $(AR) -M < $< + $(RANLIB) $@ + dx64_DATA = dx64_DATA += lib64/libxinput.a dx64_DATA += lib64/libxapofx.a @@ -1432,10 +1443,15 @@ libarm32/libruntimeobject.a: libarm32/runtimeobject.mri libarm32/libapi-ms-win-c $(AR) -M < $< $(RANLIB) $@ +libarm32/libsynchronization.a: libarm32/synchronization.mri libarm32/libapi-ms-win-core-synch-l1-2-0.a + rm -f $@ + $(AR) -M < $< + $(RANLIB) $@ + dx32_DATA = dx32_DATA += libarm32/libxinput.a dx32_DATA += libarm32/libd3dcompiler.a -libarm32_DATA += libarm32/libruntimeobject.a +libarm32_DATA += libarm32/libruntimeobject.a libarm32/libsynchronization.lib libarm32/libxinput.a: libarm32/xinput1_4.def $(DTDEFARM32) $< diff --git a/mingw-w64-crt/lib32/Makefile.am b/mingw-w64-crt/lib32/Makefile.am index 3182cca..856ec4e 100644 --- a/mingw-w64-crt/lib32/Makefile.am +++ b/mingw-w64-crt/lib32/Makefile.am @@ -5,6 +5,7 @@ lib32_DATA += %reldir%/libadsldpc.a lib32_DATA += %reldir%/libadvapi32.a lib32_DATA += %reldir%/libapcups.a lib32_DATA += %reldir%/libruntimeobject.a +lib32_DATA += %reldir%/libsynchronization.a lib32_DATA += %reldir%/libauthz.a lib32_DATA += %reldir%/libavicap32.a lib32_DATA += %reldir%/libavifil32.a diff --git a/mingw-w64-crt/lib32/api-ms-win-core-synch-l1-2-0.def b/mingw-w64-crt/lib32/api-ms-win-core-synch-l1-2-0.def new file mode 100644 index 000..cf2ed2f --- /dev/null +++ b/mingw-w64-crt/lib32/api-ms-win-core-synch-l1-2-0.def @@ -0,0 +1,5 @@ +LIBRARY "api-ms-win-core-synch-l1-2-0.dll" +EXPORTS +WaitOnAddress@16 +WakeByAddressAll@4 +WakeByAddressSingle@4 diff --git a/mingw-w64-crt/lib32/synchronization.mri b/mingw-w64-crt/lib32/synchronization.mri new file mode 100644 index 000..b9c1d28 --- /dev/null +++ b/mingw-w64-crt/lib32/synchronization.mri @@ -0,0 +1,4 @@ +CREATE lib32/libsynchronization.a +ADDLIB lib32/libapi-ms-win-core-synch-l1-2-0.a +SAVE +END diff --git a/mingw-w64-crt/lib64/api-ms-win-core-synch-l1-2-0.def b/mingw-w64-crt/lib64/api-ms-win-core-synch-l1-2-0.def new file mode 100644 index 000..0af2ba9 --- /dev/null +++ b/mingw-w64-crt/lib64/api-ms-win-core-synch-l1-2-0.def @@ -0,0 +1,5 @@ +LIBRARY "api-ms-win-core-synch-l1-2-0.dll" +EXPORTS +WaitOnAddress +WakeByAddressAll +WakeByAddressSingle diff --git a/mingw-w64-crt/lib64/synchronization.mri b/mingw-w64-crt/lib64/synchronization.mri new file mode 100644 index 000..3389a9d --- /dev/null +++ b/mingw-w64-crt/lib64/synchronization.mri @@ -0,0 +1,4 @@ +CREATE lib64/libsynchronization.a +ADDLIB lib64/libapi-ms-win-core-synch-l1-2-0.a +SAVE +END diff --git a/mingw-w64-crt/libarm32/api-ms-win-core-synch-l1-2-0.def b/mingw-w64-crt/libarm32/api-ms-win-core-synch-l1-2-0.def new file mo
[Mingw-w64-public] [PATCH] Add a libsynchronization.a
This exposes the WaitOnAddress, WakeByAddressAll and WakeByAddressSingle functions Adding those to kernel32.lib fails at runtime --- mingw-w64-crt/Makefile.am| 20 ++-- mingw-w64-crt/lib32/Makefile.am | 1 + mingw-w64-crt/lib32/api-ms-win-core-synch-l1-2-0.def | 5 + mingw-w64-crt/lib32/synchronization.mri | 4 mingw-w64-crt/lib64/api-ms-win-core-synch-l1-2-0.def | 5 + mingw-w64-crt/lib64/synchronization.mri | 4 .../libarm32/api-ms-win-core-synch-l1-2-0.def| 5 + mingw-w64-crt/libarm32/kernel32.def | 3 +++ mingw-w64-crt/libarm32/synchronization.mri | 4 9 files changed, 49 insertions(+), 2 deletions(-) create mode 100644 mingw-w64-crt/lib32/api-ms-win-core-synch-l1-2-0.def create mode 100644 mingw-w64-crt/lib32/synchronization.mri create mode 100644 mingw-w64-crt/lib64/api-ms-win-core-synch-l1-2-0.def create mode 100644 mingw-w64-crt/lib64/synchronization.mri create mode 100644 mingw-w64-crt/libarm32/api-ms-win-core-synch-l1-2-0.def create mode 100644 mingw-w64-crt/libarm32/synchronization.mri diff --git a/mingw-w64-crt/Makefile.am b/mingw-w64-crt/Makefile.am index 0bfbb26..10d9d22 100644 --- a/mingw-w64-crt/Makefile.am +++ b/mingw-w64-crt/Makefile.am @@ -642,6 +642,11 @@ lib32/libruntimeobject.a: lib32/runtimeobject.mri lib32/libapi-ms-win-core-winrt $(AR) -M < $< $(RANLIB) $@ +lib32/libsynchronization.a: lib32/synchronization.mri lib32/libapi-ms-win-core-synch-l1-2-0.a + rm -f $@ + $(AR) -M < $< + $(RANLIB) $@ + dx32_DATA = dx32_DATA += lib32/libxinput.a dx32_DATA += lib32/libxapofx.a @@ -1145,7 +1150,8 @@ lib64_DATA = \ lib64/libxaudio2_8.a lib64/libd3dcompiler_46.a lib64/libd3dcsx_46.a \ lib64/libd3d11.a lib64/libd3dcompiler_47.a \ lib64/libwinhttp.a \ - lib64/libruntimeobject.a + lib64/libruntimeobject.a \ + lib64/libsynchronization.a if !W32API lib64_DATA += lib64/libmsvcp60.a lib64/libmsvcr80.a lib64/libmsvcr90.a lib64/libmsvcr100.a lib64/libmsvcr90d.a \ @@ -1173,6 +1179,11 @@ lib64/libruntimeobject.a: lib64/runtimeobject.mri lib64/libapi-ms-win-core-winrt $(AR) -M < $< $(RANLIB) $@ +lib64/libsynchronization.a: lib64/synchronization.mri lib64/libapi-ms-win-core-synch-l1-2-0.a + rm -f $@ + $(AR) -M < $< + $(RANLIB) $@ + dx64_DATA = dx64_DATA += lib64/libxinput.a dx64_DATA += lib64/libxapofx.a @@ -1432,10 +1443,15 @@ libarm32/libruntimeobject.a: libarm32/runtimeobject.mri libarm32/libapi-ms-win-c $(AR) -M < $< $(RANLIB) $@ +libarm32/libsynchronization.a: libarm32/synchronization.mri libarm32/libapi-ms-win-core-synch-l1-2-0.a + rm -f $@ + $(AR) -M < $< + $(RANLIB) $@ + dx32_DATA = dx32_DATA += libarm32/libxinput.a dx32_DATA += libarm32/libd3dcompiler.a -libarm32_DATA += libarm32/libruntimeobject.a +libarm32_DATA += libarm32/libruntimeobject.a libarm32/libsynchronization.a libarm32/libxinput.a: libarm32/xinput1_4.def $(DTDEFARM32) $< diff --git a/mingw-w64-crt/lib32/Makefile.am b/mingw-w64-crt/lib32/Makefile.am index 3182cca..856ec4e 100644 --- a/mingw-w64-crt/lib32/Makefile.am +++ b/mingw-w64-crt/lib32/Makefile.am @@ -5,6 +5,7 @@ lib32_DATA += %reldir%/libadsldpc.a lib32_DATA += %reldir%/libadvapi32.a lib32_DATA += %reldir%/libapcups.a lib32_DATA += %reldir%/libruntimeobject.a +lib32_DATA += %reldir%/libsynchronization.a lib32_DATA += %reldir%/libauthz.a lib32_DATA += %reldir%/libavicap32.a lib32_DATA += %reldir%/libavifil32.a diff --git a/mingw-w64-crt/lib32/api-ms-win-core-synch-l1-2-0.def b/mingw-w64-crt/lib32/api-ms-win-core-synch-l1-2-0.def new file mode 100644 index 000..cf2ed2f --- /dev/null +++ b/mingw-w64-crt/lib32/api-ms-win-core-synch-l1-2-0.def @@ -0,0 +1,5 @@ +LIBRARY "api-ms-win-core-synch-l1-2-0.dll" +EXPORTS +WaitOnAddress@16 +WakeByAddressAll@4 +WakeByAddressSingle@4 diff --git a/mingw-w64-crt/lib32/synchronization.mri b/mingw-w64-crt/lib32/synchronization.mri new file mode 100644 index 000..b9c1d28 --- /dev/null +++ b/mingw-w64-crt/lib32/synchronization.mri @@ -0,0 +1,4 @@ +CREATE lib32/libsynchronization.a +ADDLIB lib32/libapi-ms-win-core-synch-l1-2-0.a +SAVE +END diff --git a/mingw-w64-crt/lib64/api-ms-win-core-synch-l1-2-0.def b/mingw-w64-crt/lib64/api-ms-win-core-synch-l1-2-0.def new file mode 100644 index 000..0af2ba9 --- /dev/null +++ b/mingw-w64-crt/lib64/api-ms-win-core-synch-l1-2-0.def @@ -0,0 +1,5 @@ +LIBRARY "api-ms-win-core-synch-l1-2-0.dll" +EXPORTS +WaitOnAddress +WakeByAddressAll +WakeByAddressSingle diff --git a/mingw-w64-crt/lib64/synchronization.mri b/mingw-w64-crt/lib64/synchronization.mri new file mode 100644 index 000..3389a9d --- /dev/null +++ b/mingw-w64-crt/lib64/synchronization.mri @@ -0,0 +1,4 @@ +CREATE lib64/libsynchronization.a +ADDLIB lib64/libapi-ms-win-core-synch-l1-2-0.a +SAVE +END diff --git a/m
Re: [Mingw-w64-public] [PATCH] Add a libsynchronization.a
On 05/31/2016 05:42 PM, Hugo Beauzée-Luyssen wrote: > This exposes the WaitOnAddress, WakeByAddressAll and WakeByAddressSingle > functions > Adding those to kernel32.lib fails at runtime > --- > mingw-w64-crt/Makefile.am| 20 > ++-- > mingw-w64-crt/lib32/Makefile.am | 1 + > mingw-w64-crt/lib32/api-ms-win-core-synch-l1-2-0.def | 5 + > mingw-w64-crt/lib32/synchronization.mri | 4 > mingw-w64-crt/lib64/api-ms-win-core-synch-l1-2-0.def | 5 + > mingw-w64-crt/lib64/synchronization.mri | 4 > .../libarm32/api-ms-win-core-synch-l1-2-0.def| 5 + > mingw-w64-crt/libarm32/kernel32.def | 3 +++ > 8 files changed, 45 insertions(+), 2 deletions(-) > create mode 100644 mingw-w64-crt/lib32/api-ms-win-core-synch-l1-2-0.def > create mode 100644 mingw-w64-crt/lib32/synchronization.mri > create mode 100644 mingw-w64-crt/lib64/api-ms-win-core-synch-l1-2-0.def > create mode 100644 mingw-w64-crt/lib64/synchronization.mri > create mode 100644 mingw-w64-crt/libarm32/api-ms-win-core-synch-l1-2-0.def > > diff --git a/mingw-w64-crt/Makefile.am b/mingw-w64-crt/Makefile.am > index 0bfbb26..9c31cdb 100644 > --- a/mingw-w64-crt/Makefile.am > +++ b/mingw-w64-crt/Makefile.am > @@ -642,6 +642,11 @@ lib32/libruntimeobject.a: lib32/runtimeobject.mri > lib32/libapi-ms-win-core-winrt > $(AR) -M < $< > $(RANLIB) $@ > > +lib32/libsynchronization.a: lib32/synchronization.mri > lib32/libapi-ms-win-core-synch-l1-2-0.a > + rm -f $@ > + $(AR) -M < $< > + $(RANLIB) $@ > + > dx32_DATA = > dx32_DATA += lib32/libxinput.a > dx32_DATA += lib32/libxapofx.a > @@ -1145,7 +1150,8 @@ lib64_DATA = \ > lib64/libxaudio2_8.a lib64/libd3dcompiler_46.a lib64/libd3dcsx_46.a \ > lib64/libd3d11.a lib64/libd3dcompiler_47.a \ > lib64/libwinhttp.a \ > - lib64/libruntimeobject.a > + lib64/libruntimeobject.a \ > + lib64/libsynchronization.a > > if !W32API > lib64_DATA += lib64/libmsvcp60.a lib64/libmsvcr80.a lib64/libmsvcr90.a > lib64/libmsvcr100.a lib64/libmsvcr90d.a \ > @@ -1173,6 +1179,11 @@ lib64/libruntimeobject.a: lib64/runtimeobject.mri > lib64/libapi-ms-win-core-winrt > $(AR) -M < $< > $(RANLIB) $@ > > +lib64/libsynchronization.a: lib64/synchronization.mri > lib64/libapi-ms-win-core-synch-l1-2-0.a > + rm -f $@ > + $(AR) -M < $< > + $(RANLIB) $@ > + > dx64_DATA = > dx64_DATA += lib64/libxinput.a > dx64_DATA += lib64/libxapofx.a > @@ -1432,10 +1443,15 @@ libarm32/libruntimeobject.a: > libarm32/runtimeobject.mri libarm32/libapi-ms-win-c > $(AR) -M < $< > $(RANLIB) $@ > > +libarm32/libsynchronization.a: libarm32/synchronization.mri > libarm32/libapi-ms-win-core-synch-l1-2-0.a > + rm -f $@ > + $(AR) -M < $< > + $(RANLIB) $@ > + > dx32_DATA = > dx32_DATA += libarm32/libxinput.a > dx32_DATA += libarm32/libd3dcompiler.a > -libarm32_DATA += libarm32/libruntimeobject.a > +libarm32_DATA += libarm32/libruntimeobject.a libarm32/libsynchronization.lib > > libarm32/libxinput.a: libarm32/xinput1_4.def > $(DTDEFARM32) $< > diff --git a/mingw-w64-crt/lib32/Makefile.am b/mingw-w64-crt/lib32/Makefile.am > index 3182cca..856ec4e 100644 > --- a/mingw-w64-crt/lib32/Makefile.am > +++ b/mingw-w64-crt/lib32/Makefile.am > @@ -5,6 +5,7 @@ lib32_DATA += %reldir%/libadsldpc.a > lib32_DATA += %reldir%/libadvapi32.a > lib32_DATA += %reldir%/libapcups.a > lib32_DATA += %reldir%/libruntimeobject.a > +lib32_DATA += %reldir%/libsynchronization.a > lib32_DATA += %reldir%/libauthz.a > lib32_DATA += %reldir%/libavicap32.a > lib32_DATA += %reldir%/libavifil32.a > diff --git a/mingw-w64-crt/lib32/api-ms-win-core-synch-l1-2-0.def > b/mingw-w64-crt/lib32/api-ms-win-core-synch-l1-2-0.def > new file mode 100644 > index 000..cf2ed2f > --- /dev/null > +++ b/mingw-w64-crt/lib32/api-ms-win-core-synch-l1-2-0.def > @@ -0,0 +1,5 @@ > +LIBRARY "api-ms-win-core-synch-l1-2-0.dll" > +EXPORTS > +WaitOnAddress@16 > +WakeByAddressAll@4 > +WakeByAddressSingle@4 > diff --git a/mingw-w64-crt/lib32/synchronization.mri > b/mingw-w64-crt/lib32/synchronization.mri > new file mode 100644 > index 000..b9c1d28 > --- /dev/null > +++ b/mingw-w64-crt/lib32/synchronization.mri > @@ -0,0 +1,4 @@ > +CREATE lib32/libsynchronization.a > +ADDLIB lib32/libapi-ms-win-core-synch-l1-2-0.a > +SAVE > +END > diff --git a/mingw-w64-crt/lib64/api-ms-win-core-synch-l1-2-0.def > b/mingw-w64-crt/lib64/api-ms-win-core-synch-l1-2-0.def > new file mode 100644 > index 000..0af2ba9 > --- /dev/null > +++ b/mingw-w64-crt/lib64/api-ms-win-core-synch-l1-2-0.def > @@ -0,0 +1,5 @@ > +LIBRARY "api-ms-win-core-synch-l1-2-0.dll" > +EXPORTS > +WaitOnAddress > +WakeByAddressAll > +WakeByAddressSingle > diff --git a/mingw-w64-crt/lib64/synchronization.mri > b/mingw-w64-crt/lib64/synchronization.mri > new file mode 100644 > index 000..3389a9
[Mingw-w64-public] winpthreads, pthread_setschedparam, and detached threads
The way the winpthreads code is writing, the Windows handle for the thread is cleared when the thread is made detached. That means that the pthread_setschedparam() call can't work. So thread priorities for detached threads can only be set once, at thread creation, before the thread is detached, or as part of the pthread_create() call. Is there a reason for this? For me, it's unexpected behavior. -- What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic patterns at an interface-level. Reveals which users, apps, and protocols are consuming the most bandwidth. Provides multi-vendor support for NetFlow, J-Flow, sFlow and other flows. Make informed decisions using capacity planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e ___ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
Re: [Mingw-w64-public] winpthreads, pthread_setschedparam, and detached threads
Hi Glenn! On Tue, May 31, 2016 at 11:11 AM, Burkhardt, Glenn BUTAS wrote: > The way the winpthreads code is writing, the Windows handle for the thread is > cleared when the thread is made detached. That means that the > pthread_setschedparam() call can't work. So thread priorities for detached > threads can only be set once, at thread creation, before the thread is > detached, or as part of the pthread_create() call. > > Is there a reason for this? For me, it's unexpected behavior. I don't see anything in the pthreads documentation that makes clear whether this should be allowed or not. However, the error-code return values for pthread_setschedparam() does not list an error value for this situation, which perhaps is a hint that it should work. On the other hand, there does seem to be precedent for this not working. I found some documentation for DEC / VMS pthreads here: http://www.mi.infn.it/~calcolo/OpenVMS/ssb71/6493/6493p002.htm Quoting from paragraph 2.3.4: It is illegal for your program to attempt any operation on a detached thread or to use any information in the thread object associated with a detached thread. For instance, a thread cannot join on a detached thread, and your program cannot cancel a detached thread. So it sounds like the VMS implementation, at least, doesn't support calling pthread_setschedparam() on a detached thread. (I wonder if a detached thread calling pthread_setschedparam() on itself could be an edge case in some implementations.) Happy Hacking! K. Frank -- What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic patterns at an interface-level. Reveals which users, apps, and protocols are consuming the most bandwidth. Provides multi-vendor support for NetFlow, J-Flow, sFlow and other flows. Make informed decisions using capacity planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e ___ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
Re: [Mingw-w64-public] winpthreads, pthread_setschedparam, and detached threads
Note that in most cases threads other than the one calling `pthread_detach()` can terminate at anytime. After a call `pthread_detach()`, if the thread terminates, its resources are freed automatically, rendering the `pthread_t` no longer valid. It is impossible to tell whether a `pthread_t` is designating a thread that has terminated. It may even be designating a thread that is different from the one the user expects because thread IDs can be reused. By calling `pthread_detach()` on a `pthread_t` you _semantically_ destroy/close it and should not use it any more. -- Best regards, lh_mouse 2016-06-01 - 发件人:"Burkhardt, Glenn BUTAS" 发送日期:2016-05-31 23:11 收件人:mingw-w64-public@lists.sourceforge.net 抄送: 主题:[Mingw-w64-public] winpthreads, pthread_setschedparam, and detached threads The way the winpthreads code is writing, the Windows handle for the thread is cleared when the thread is made detached. That means that the pthread_setschedparam() call can't work. So thread priorities for detached threads can only be set once, at thread creation, before the thread is detached, or as part of the pthread_create() call. Is there a reason for this? For me, it's unexpected behavior. -- What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic patterns at an interface-level. Reveals which users, apps, and protocols are consuming the most bandwidth. Provides multi-vendor support for NetFlow, J-Flow, sFlow and other flows. Make informed decisions using capacity planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e ___ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public