In Progress

BSD licensed GCC x86 32/64bit RTL atomic operations library

The library shall implement common atomic operations such as inc, dec, add, sub, xchg, cmpxchg, xadd. See for example Linux kernel atomic operations.

A test program written in C must be provided

The library shall compile with GNU/GCC 4.1 or later and is to be BSD licensed.

The library shall support x86 32bit (i686+) and 64bit CPU's

Operand sizes are 8, 16, 32 and 64bits (also on 32 bit i686+ systems).

Examples are:

/*!

* Atomically exchange 32 bit values

*

* @param p Pointer to value

* @param v new 32 bit value

* @return old new v value

*/

static inline uint atomic_xchg32(volatile uint *p, uint v)

{

__asm__ __volatile__("xchgl %0, %1"

:"=q" (v)

:"m" (*p), "0" (v)

:"memory");

return v;

}

/*!

* Atomically xadd to 4byte value

*

* @param p Pointer to value

* @param v value to add

*/

static inline u32 atomic_xadd32(uint *p, uint v)

{

__asm__ __volatile__("lock xaddl %0, (%1)n"

: "+r" (v), "+r" (p)

:

: "memory");

return v;

}

The implementation _must_ be _original_ and the copyright holder is the developer, under the following 2 clause BSD license.

/* Copyright (c), 201x developer

* All rights reserved.

*

* Redistribution and use in source and binary forms, with or without

* modification, are permitted provided that the following conditions are met:

*

* * Redistributions of source code must retain the above copyright

* notice, this list of conditions and the following disclaimer.

* * The name of developer may not be used to endorse or promote products derived from this software

* without specific prior written permission.

*

* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS

* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT

* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR

* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT

* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,

* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT

* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,

* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY

* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT

* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE

* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

*/

Please provide a detailed list of functions you intend to implement.

Please explain how you will implement the test program to test these functions.

Skills: Assembly, C Programming, Linux

See more: bsd atomic library, gcc atomic library, rtl xaddl, gcc atomic, static programming, r architecture, programming theory, programming library, programming binary, pointer programming, param software services, param software, source programming, operations binary, list services linux, linux list services, linux kernel developer, library programming, use binary, code binary, gcc functions, fitness programming, example services contract, example contract services, event promote

About the Employer:
( 11 reviews ) Buriram, Thailand

Project ID: #1271103

Awarded to:

sudolskym

Hello, I am C/C++ and assembler programmer. I am familiar with x86 and x64 architecture. I am sending my list of function in PM. Regards, Michal

$200 USD in 10 days
(24 Reviews)
5.7
rodneydd

Hello. I have implemented this kind of library before on other architectures. I have experience of concurrent programming from working extensively with Real Time Operating Systems. Also I am well versed in C, as More

$180 USD in 10 days
(1 Review)
2.5

8 freelancers are bidding on average $188 for this job

ppierog

I can do it

$200 USD in 10 days
(2 Reviews)
3.9
steveDana

HELLO SIR PLEASE CHECK PMB

$190 USD in 4 days
(0 Reviews)
0.0
kevinorange7

HELLO SIR PLEASE CHECK PMB

$180 USD in 4 days
(0 Reviews)
0.0
harry722

hello sir please check pmb

$150 USD in 1 day
(0 Reviews)
0.0
jordanmarvok

PLEASE CHECK PMB FOR MORE DETAILS

$205 USD in 4 days
(0 Reviews)
0.0
gtplbl

hello sir please chk pmb

$200 USD in 4 days
(0 Reviews)
0.0