[Devel] Cross compile and fastlock.h

Cedric Stevens cedric.stevens at oss.co.za
Thu Jan 18 16:20:58 CET 2007


Hi Bogdan

Looking at the fastlock.h, would it not be preferential to use O/S type 
spinlocks such as the linux spinlock.h? Does fastlock perform a spinlock 
function?

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.

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
>
> cedric.stevens at oss.co.za 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
>> Devel at openser.org
>> 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: cedric.stevens at oss.co.za <mailto:cedric.stevens at oss.co.za>
web: http://www.oss.co.za
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://openser.org/pipermail/devel/attachments/20070118/e51f416d/attachment.html


More information about the Devel mailing list