EPICS Home

Experimental Physics and Industrial Control System


 
2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <20172018  2019  2020  2021  2022  2023  2024  Index 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <20172018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: changes to libCom/osi/os/osdThread.c to be used for RTEMS 4.12
From: Heinz Junkes <[email protected]>
To: Michael Davidsaver <[email protected]>
Cc: [email protected]
Date: Wed, 3 May 2017 04:27:44 +0200
Had a typo in osdThread.c

=== modified file 'src/libCom/osi/os/posix/osdThread.c'
--- src/libCom/osi/os/posix/osdThread.c 2017-04-28 16:48:45 +0000
+++ src/libCom/osi/os/posix/osdThread.c 2017-05-02 09:44:58 +0000
@@ -527,7 +527,7 @@
 #if defined (OSITHREAD_USE_DEFAULT_STACK)
     return 0;
 #elif defined(_POSIX_THREAD_ATTR_STACKSIZE) && _POSIX_THREAD_ATTR_STACKSIZE > 0
-#if defined (__rtems)
+#if defined (__rtems__)
     #define STACK_SIZE(f) (f * 0x1000 * sizeof(void *))
 #else
     #define STACK_SIZE(f) (f * 0x10000 * sizeof(void *))

Had to use printk in the early stage of pthread_once task creation. With printf remains RTEMS hang during rtems_init initialization.

If it comes however to the concise output of printf and printk they are mixed :-( 
Had to add a mutex or something similar…

Will have a look to the duplicate definition of 'struct epicsEventOSD’…

Heinz 

On 1. May 2017 at 21:07:30, Michael Davidsaver ([email protected]) wrote:

On 04/26/2017 05:52 AM, Heinz Junkes wrote:
>
> -static pthread_key_t getpthreadInfo;
> +__thread epicsThreadOSD *tls_pthreadInfo;

Well, the main potential issue I see is the '__thread' qualifier is not
part of standard (until C11 when it is spelled 'thread_local'). I know
that GCC and clang have supported this for some time. Have you (or
Andrew) confirmed support with sun studio? I find references which
suggest that this has been supported for some time there as well.

https://blogs.oracle.com/x86be/entry/thread_local_storage_support_in

https://docs.oracle.com/cd/E19205-01/819-5267/bkaeg/index.html


Other points:

* the duplicate definition of 'struct epicsEventOSD' should avoided.

* Why prefer prink to fprintf in some, but not all cases? I suspect
that fprintf will work for all cases in this file, or alternately
#define printf in terms of printk.




I've also pushed some changes to fix building against RTEMS 4.10. I
haven't been able to run test this yet.

Attachment: smime.p7s
Description: S/MIME cryptographic signature


References:
changes to libCom/osi/os/osdThread.c to be used for RTEMS 4.12 Heinz Junkes
Re: changes to libCom/osi/os/osdThread.c to be used for RTEMS 4.12 Michael Davidsaver

Navigate by Date:
Prev: Jenkins build is back to normal : epics-base-3.16-win32s #98 APS Jenkins
Next: Database Field type in db_access.h Jeong Han Lee
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <20172018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: changes to libCom/osi/os/osdThread.c to be used for RTEMS 4.12 Michael Davidsaver
Next: Build failed in Jenkins: epics-base-3.15-win32s-test #110 APS Jenkins
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <20172018  2019  2020  2021  2022  2023  2024