Compare commits

...

10 Commits

Author SHA1 Message Date
openeuler-ci-bot
43e4e8c426
!18 update the release to 3
From: @yaowenbin1 
Reviewed-by: @SuperSix173 
Signed-off-by: @SuperSix173
2022-10-25 12:46:57 +00:00
yaowenbin
d8889d2dd2 update the release to 3
Signed-off-by: yaowenbin <yaowenbin1@huawei.com>
2022-10-25 20:21:43 +08:00
openeuler-ci-bot
6a787d3eca !7 w32: Use cast by uintptr_t for thread ID
From: @euleroswander
Reviewed-by: @wswsamao
Signed-off-by: @wswsamao
2020-09-28 21:44:41 +08:00
EulerOSWander
d4b09cff88 w32: Use cast by uintptr_T for thread ID
Signed-off-by: EulerOSWander <314264452@qq.com>
2020-09-28 20:13:41 +08:00
openeuler-ci-bot
3010e82ede !6 【mainline】添加差异yaml文件
Merge pull request !6 from xinghe/master
2020-08-17 14:33:15 +08:00
jinzhimin369
49c8f7b2ed add yaml diff version 2020-08-14 15:43:58 +08:00
openeuler-ci-bot
65dfcfb7cf !4 npth
Merge pull request !4 from xinghe/master
2020-08-12 16:52:00 +08:00
weiwei_150212
2e021965d1 update version 2020-08-10 21:26:09 +08:00
openeuler-ci-bot
79793497fe !3 update to 1.6
Merge pull request !3 from 靳智敏/master
2020-07-23 15:41:13 +08:00
jinzhimin369
fe4312ea4f update to 1.6 2020-07-23 05:03:02 +00:00
6 changed files with 92 additions and 3 deletions

View File

@ -0,0 +1,73 @@
From 377c1b91e67af25613ccb72ee26449661cea8d8e Mon Sep 17 00:00:00 2001
From: NIIBE Yutaka <gniibe@fsij.org>
Date: Thu, 8 Nov 2018 13:26:41 +0900
Subject: [PATCH 12/18] w32: Use cast by uintptr_t for thread ID.
* w32/npth.c (npth_init): Cast with uintptr_t.
(npth_setname_np, npth_create, npth_self): Likewise.
--
In w32/npth.h, npth_t is unsigned long int type, which is 32-bit
for both of 32-bit machine and 64-bit machine.
We use TlsSetValue, TlsGetValue and CreateThread API to handle
thread ID, which uses void * type, which is 64-bit on 64-bit
machine.
Because the size is different on 64-bit machine, here, we use explicit
cast to integer type which has enough size to have pointer.
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
---
w32/npth.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/w32/npth.c b/w32/npth.c
index 6ea6d19..41213c0 100644
--- a/w32/npth.c
+++ b/w32/npth.c
@@ -351,7 +351,7 @@ npth_init (void)
thread = thread_table[thread_id];
thread->handle = handle;
- if (! TlsSetValue(tls_index, (LPVOID) thread_id))
+ if (! TlsSetValue(tls_index, (LPVOID)(uintptr_t) thread_id))
return map_error (GetLastError());
LEAVE();
@@ -449,11 +449,11 @@ npth_setname_np (npth_t target_thread, const char *name)
static DWORD
thread_start (void *arg)
{
- npth_t thread_id = (npth_t) arg;
+ npth_t thread_id = (npth_t)(uintptr_t) arg;
npth_impl_t thread;
void *result;
- if (! TlsSetValue(tls_index, (LPVOID) thread_id))
+ if (! TlsSetValue(tls_index, (LPVOID)(uintptr_t) thread_id))
/* FIXME: There is not much we can do here. */
;
@@ -519,7 +519,7 @@ npth_create (npth_t *newthread, const npth_attr_t *user_attr,
handle = CreateThread (NULL, 0,
(LPTHREAD_START_ROUTINE)thread_start,
- (void *) thread_id, CREATE_SUSPENDED,
+ (void *)(uintptr_t) thread_id, CREATE_SUSPENDED,
NULL);
if (handle == NULL)
{
@@ -556,7 +556,7 @@ npth_self (void)
if (thread_id == 0 && GetLastError() != ERROR_SUCCESS)
/* FIXME: Log the error. */
;
- return (npth_t) thread_id;
+ return (npth_t)(uintptr_t) thread_id;
}
--
1.8.3.1

5
npth-1.5-vs-1.6.yaml Normal file
View File

@ -0,0 +1,5 @@
name: npth
old_version: 1.5
new_version: 1.6
interface_differences:
remark: '没有影响用户态使用差异,修复Windows上的少量内存泄漏和HPUX的要求无接口变更兼容性变更;'

Binary file not shown.

BIN
npth-1.6.tar.bz2 Normal file

Binary file not shown.

View File

@ -1,6 +1,6 @@
Name: npth
Version: 1.5
Release: 7
Version: 1.6
Release: 3
Summary: The New GNU Portable Threads library
License: LGPLv2+
URL: http://git.gnupg.org/cgi-bin/gitweb.cgi?p=npth.git
@ -19,6 +19,8 @@ stack, signal mask and errno variable.
%package devel
Summary: Development files for %{name}
Patch6000: backport-0001-w32-Use-cast-by-uintptr_t-for-thread-ID.patch
Requires: %{name}%{?_isa} = %{version}-%{release}
%description devel
@ -55,5 +57,14 @@ make check
%{_datadir}/aclocal/%{name}.m4
%changelog
* Tue Oct 25 2022 yaowenbin <yaowenbin1@huawei.com> - 1.6-3
- Update the release to 3
* Mon Sep 28 2020 EulerOSWander <314264452@qq.com> - 1.6-2
- Use cast by uintptr_t for thread ID.
* Thu Jul 23 2020 jinzhimin <jinzhimin2@huawei.com> - 1.6-1
- Package update
* Tue Aug 13 2019 openEuler Buildteam <buildteam@openeuler.org> - 1.5-7
- Package init

View File

@ -1,4 +1,4 @@
version_control: git
src_repo: http://git.gnupg.org/cgi-bin/gitweb.cgi?p=npth.git
src_repo: http://dev.gnupg.org/source/npth.git
tag_prefix: ^npth-
seperator: .