From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10918 invoked by alias); 28 Nov 2006 16:22:21 -0000 Received: (qmail 10873 invoked by uid 22791); 28 Nov 2006 16:22:18 -0000 X-Spam-Check-By: sourceware.org Received: from moutng.kundenserver.de (HELO moutng.kundenserver.de) (212.227.126.187) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 28 Nov 2006 16:22:04 +0000 Received: from [84.154.152.45] (helo=[192.168.1.20]) by mrelayeu.kundenserver.de (node=mrelayeu5) with ESMTP (Nemesis), id 0ML25U-1Gp5ia3BGn-0003CQ; Tue, 28 Nov 2006 17:22:01 +0100 Message-ID: <456C62A1.9090202@marcelruff.info> Date: Tue, 28 Nov 2006 16:22:00 -0000 From: Marcel Ruff User-Agent: Thunderbird 1.5.0.8 (X11/20061025) MIME-Version: 1.0 To: pthreads-win32@sources.redhat.com Subject: Patch of current cvs for WinCE Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact pthreads-win32-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: pthreads-win32-owner@sourceware.org X-SW-Source: 2006/txt/msg00062.txt.bz2 Hi, with some minor changes the pthreads CVS snapshot from today (2006-11-28 PTW32_VERSION 2,8,0,0) compiles with Visual C++ 8.0.5 2005 (on a XP) for the target Windows CE 4.2, Smartphone 2003 with ARM4 processor. My multi threaded application seem to run fine, but it keeps getting strange return codes for pthread_cond_destroy() pthread_mutex_destroy() those calls return 16 (which is EBUSY) in need_errno.h. I ignore it and my applications continues as expected. Most probably this (my) hack is the reason: What do i have to return in pthread_cancel.c instead of FpExc?? 43a44,47 > #if defined(WINCE) > #define PTW32_PROGCTR(Context) ((Context).FpExc) > #endif (Context is defined in my winnt.h) What is the role of process.h (as i have disabled it, see patch below)? In errno.c there are pthread_self () returns pthread_t which is sometimes a pointer on a big struct, whereas in my case it ended up to typedef struct { void * p; /* Pointer to actual object */ unsigned int x; /* Extra information - reuse count etc */ } ptw32_handle_t; How can i track this down? thank you Marcel ====== the patch ======= Index: create.c =================================================================== RCS file: /cvs/pthreads-win32/pthreads/create.c,v retrieving revision 1.63 diff -r1.63 create.c 41c41,43 < #include --- > # ifndef WINCE > # include > # endif Index: errno.c =================================================================== RCS file: /cvs/pthreads-win32/pthreads/errno.c,v retrieving revision 1.13 diff -r1.13 errno.c 76a77,90 > # ifdef WINCE > if ((self = pthread_self ()).p == NULL) > { > /* > * Yikes! unable to allocate a thread! > * Throw an exception? return an error? > */ > result = &reallyBad; > } > else > { > result = 0; /* &(self.x) Which errno is appropriate? */ > } > # else 88a103 > # endif Index: exit.c =================================================================== RCS file: /cvs/pthreads-win32/pthreads/exit.c,v retrieving revision 1.40 diff -r1.40 exit.c 41c41,43 < # include --- > # ifndef WINCE > # include > # endif Index: implement.h =================================================================== RCS file: /cvs/pthreads-win32/pthreads/implement.h,v retrieving revision 1.117 diff -r1.117 implement.h 661c661,663 < # include --- > # ifndef WINCE > # include > # endif Index: mutex.c =================================================================== RCS file: /cvs/pthreads-win32/pthreads/mutex.c,v retrieving revision 1.63 diff -r1.63 mutex.c 38c38,40 < # include --- > # ifndef WINCE > # include > # endif Index: pthread.h =================================================================== RCS file: /cvs/pthreads-win32/pthreads/pthread.h,v retrieving revision 1.135 diff -r1.135 pthread.h 1215c1215,1217 < PTW32_DLLPORT int * PTW32_CDECL _errno( void ); --- > # ifndef WINCE > PTW32_DLLPORT int * PTW32_CDECL _errno( void ); > # endif Index: pthread_cancel.c =================================================================== RCS file: /cvs/pthreads-win32/pthreads/pthread_cancel.c,v retrieving revision 1.10 diff -r1.10 pthread_cancel.c 43a44,47 > #if defined(WINCE) > #define PTW32_PROGCTR(Context) ((Context).FpExc) > #endif > Index: pthread_detach.c =================================================================== RCS file: /cvs/pthreads-win32/pthreads/pthread_detach.c,v retrieving revision 1.10 diff -r1.10 pthread_detach.c 45c45,47 < #include --- > #ifndef WINCE > # include > #endif Index: pthread_join.c =================================================================== RCS file: /cvs/pthreads-win32/pthreads/pthread_join.c,v retrieving revision 1.11 diff -r1.11 pthread_join.c 45c45,47 < #include --- > #ifndef WINCE > # include > #endif Index: pthread_kill.c =================================================================== RCS file: /cvs/pthreads-win32/pthreads/pthread_kill.c,v retrieving revision 1.7 diff -r1.7 pthread_kill.c 44c44,46 < #include --- > #ifndef WINCE > # include > #endif Index: pthread_rwlock_destroy.c =================================================================== RCS file: /cvs/pthreads-win32/pthreads/pthread_rwlock_destroy.c,v retrieving revision 1.5 diff -r1.5 pthread_rwlock_destroy.c 37c37 < #include --- > /*#include is included by pthread.h (Marcel Ruff 2006-11-28) */ Index: pthread_rwlock_init.c =================================================================== RCS file: /cvs/pthreads-win32/pthreads/pthread_rwlock_init.c,v retrieving revision 1.5 diff -r1.5 pthread_rwlock_init.c 37c37 < #include --- > /*#include is included by pthread.h (Marcel Ruff 2006-11-28) */ Index: pthread_rwlock_rdlock.c =================================================================== RCS file: /cvs/pthreads-win32/pthreads/pthread_rwlock_rdlock.c,v retrieving revision 1.5 diff -r1.5 pthread_rwlock_rdlock.c 37c37 < #include --- > /*#include is included by pthread.h (Marcel Ruff 2006-11-28) */ Index: pthread_rwlock_timedrdlock.c =================================================================== RCS file: /cvs/pthreads-win32/pthreads/pthread_rwlock_timedrdlock.c,v retrieving revision 1.5 diff -r1.5 pthread_rwlock_timedrdlock.c 37c37 < #include --- > /*#include is included by pthread.h (Marcel Ruff 2006-11-28) */ Index: pthread_rwlock_timedwrlock.c =================================================================== RCS file: /cvs/pthreads-win32/pthreads/pthread_rwlock_timedwrlock.c,v retrieving revision 1.5 diff -r1.5 pthread_rwlock_timedwrlock.c 37c37 < #include --- > /*#include is included by pthread.h (Marcel Ruff 2006-11-28) */ Index: pthread_rwlock_tryrdlock.c =================================================================== RCS file: /cvs/pthreads-win32/pthreads/pthread_rwlock_tryrdlock.c,v retrieving revision 1.5 diff -r1.5 pthread_rwlock_tryrdlock.c 37c37 < #include --- > /*#include is included by pthread.h (Marcel Ruff 2006-11-28) */ Index: pthread_rwlock_trywrlock.c =================================================================== RCS file: /cvs/pthreads-win32/pthreads/pthread_rwlock_trywrlock.c,v retrieving revision 1.5 diff -r1.5 pthread_rwlock_trywrlock.c 37c37 < #include --- > /*#include is included by pthread.h (Marcel Ruff 2006-11-28) */ Index: pthread_rwlock_unlock.c =================================================================== RCS file: /cvs/pthreads-win32/pthreads/pthread_rwlock_unlock.c,v retrieving revision 1.5 diff -r1.5 pthread_rwlock_unlock.c 37c37 < #include --- > /*#include is included by pthread.h (Marcel Ruff 2006-11-28) */ Index: pthread_rwlock_wrlock.c =================================================================== RCS file: /cvs/pthreads-win32/pthreads/pthread_rwlock_wrlock.c,v retrieving revision 1.6 diff -r1.6 pthread_rwlock_wrlock.c 37c37 < #include --- > /*#include is included by pthread.h (Marcel Ruff 2006-11-28) */ Index: pthread_rwlockattr_destroy.c =================================================================== RCS file: /cvs/pthreads-win32/pthreads/pthread_rwlockattr_destroy.c,v retrieving revision 1.5 diff -r1.5 pthread_rwlockattr_destroy.c 37c37 < #include --- > /*#include is included by pthread.h (Marcel Ruff 2006-11-28) */ Index: pthread_rwlockattr_getpshared.c =================================================================== RCS file: /cvs/pthreads-win32/pthreads/pthread_rwlockattr_getpshared.c,v retrieving revision 1.5 diff -r1.5 pthread_rwlockattr_getpshared.c 37c37 < #include --- > /*#include is included by pthread.h (Marcel Ruff 2006-11-28) */ Index: pthread_rwlockattr_init.c =================================================================== RCS file: /cvs/pthreads-win32/pthreads/pthread_rwlockattr_init.c,v retrieving revision 1.5 diff -r1.5 pthread_rwlockattr_init.c 37c37 < #include --- > /*#include is included by pthread.h (Marcel Ruff 2006-11-28) */ Index: pthread_rwlockattr_setpshared.c =================================================================== RCS file: /cvs/pthreads-win32/pthreads/pthread_rwlockattr_setpshared.c,v retrieving revision 1.5 diff -r1.5 pthread_rwlockattr_setpshared.c 37c37 < #include --- > /*#include is included by pthread.h (Marcel Ruff 2006-11-28) */