Hi again, Tim.
Just wondered, if this operation in `muse_atomic_set` can be considered
safe? (i386 case)
`v->counter = i;`
It seems that it can be easily interrupted.
Regards,
Andrew
01.02.2015 05:54, Andrew Deryabin wrote:
Hi Tim,
Just made a check:
------------
Konsole output
gcc -m32 -dM -E -x c /dev/null | grep 386
Konsole output
#define __i386 1
#define __i386__ 1
#define i386 1
------------
------------
Konsole output
clang -m32 -dM -E -x c /dev/null | grep 386
Konsole output
#define __i386 1
#define __i386__ 1
#define i386 1
------------
So it seems, that all of these macros are defined both on gcc and clang.
Regards,
Andrew
31.01.2015 23:58, Tim E. Real wrote:
Hi.
I asked this before but can't remember, I think some said they got
different results:
Can you guys please simply check in the (new) file muse_atomic.h,
and tell me if the sections marked "#ifndef i386" are active?
(I created this file and simply moved some code from another file into it.)
On all my systems (currently KUbuntu, Intel) the "#ifndef i386" sections
have been active (as viewed in KDevelop) for as long as I can remember.
Yet the compiler actually knows about this i386 define - you can see it
in a printout of a simple "test for compile defines" program.
I do not know if the compiler is actually compiling THOSE sections.
I would need to check compiled objects...
Just that KDevelop shows the sections as active.
I want to change the define test to "#ifndef __i386__" which works.
But is that really correct? SHOULD it be i386 not __i386__?
This issue could be important, it means MusE might gain a good
speed boost by using processor atomic features instead of calling
pthread_mutex_lock() !
Tim.
------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now.http://goparallel.sourceforge.net/
_______________________________________________
Lmuse-developer mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/lmuse-developer
------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Lmuse-developer mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/lmuse-developer