Hi Cedric,
Cedric Stevens wrote:
Hi Bogdan
Looking at the fastlock.h, would it not be preferential to use O/S
type spinlocks such as the linux spinlock.h?
definitely - the arch dependent spinlocks are much faster than what the
OS provides.
Does fastlock perform a spinlock function?
yes, the fastlock implements a very fast busy lock.
Apart from this, my cross compiler is gcc 3.2.1 which complains about
the following asm construct in fastlock.h line 77:
asm volatile(
" btsl $0, %1 \n\t"
" adcl $0, %0 \n\t"
: "=q" (val), "=m" (*lock) : "0"(val) : "memory", "cc"
/* "cc" */
)
inconsistent operand constraints in an `asm'
gcc 4 does not complain about this.
do you get this only when crosscompiling? is normal compiling successful?
regards,
bogdan
Regards
Cedric
Bogdan-Andrei Iancu wrote:
Hi Cedric,
fastlock implementation is architecture dependent, but there are
other options for the locking support. See in Makefile.defs:
# -DFAST_LOCK
# uses fast arhitecture specific locking (see the arh.
specific section)
# -DUSE_SYSV_SEM
# uses sys v sems for locking (slower & limited number)
# -DUSE_PTHREAD_MUTEX
# uses pthread mutexes, faster than sys v or posix sems, but
do not
# work on all systems inter-processes (e.g. linux)
# -DUSE_POSIX_SEM
# uses posix semaphores for locking (faster than sys v)
use any of them in DEFS+=.
regards,
bogdan
[EMAIL PROTECTED] wrote:
Hi
I am cross compiling openser to the cris platform, but need to write an
extention to fastlock.h for this processor.
Where can I find information on what the purpose and function of
fastlock.h is
so that I cam implement code for the new platform?
Thanks
Cedric
_______________________________________________
Devel mailing list
[email protected]
http://openser.org/cgi-bin/mailman/listinfo/devel
--
--
Cedric Stevens
OSS Technologies (Pty) Ltd
Box 41495, MoreletaPark, Pretoria, 0044
South Africa
mobile +27.83.326.2693
voice: +27.12.997.6460
Fax: +27.12.997.7160
mailto: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
web: http://www.oss.co.za
_______________________________________________
Devel mailing list
[email protected]
http://openser.org/cgi-bin/mailman/listinfo/devel