RTEMS/rtems — pull request #2 by WeiY (2012-07-25 05:57:19+00:00)
Title: This is first version of atomic support for i386 architecture on RTEMS

The feature includes atomic API design for all architecture, atomic
implementation for i386 architecture which is mostly ported from FreeBSD
kernel, seven test cases for all atomic operations. Those test cases do
not guarantee all operations function correct except atomic operations
with no memory barrier option.
touch two new files for atomic operations

rtems/score/atomic.h is atomic API definition file.
rtems/score/atomic_cpu.h is atomic implementation file for i386 architecture.

add the basic atomic date type definition to atomic_cpu.h for i386
add the general atomic load and store functions API definition to
atomic.h

delete the original atomic API definitions. and replace with the
method of external the functions in the implementation file.

add other atomic operations API definitions to the atomic.h

touch a new file atomic_manager.c file which is a wraper for all
architectures atomic operations

add a enumeration ATOMIC_memory_barrier and modify the atomic API
definition of adding a new argument memory barrier.

add the basic prototype to the atomic_manager.c

wraper the atomic implementations to the atomic_manager.c. Just a
basic wraper which will need to be modified.

Modify the name style on date type and function name.

Change the typedef Atomic_ptr to uintptr_t.

Make all the atomic API definitions static inline.

Modify the name style of date type and function name for atomic.inl

Delete all the atomic specified date type, using the basic rtems
date type.

add the marco _RTEMS_ATOMIC_INL to atomic.inl.

modify the unsigned int and unsigned long data type to u_int and u_long

add _SCORE_ to macro in the header file in score.

add atomic_cpu.h for PowerPC architecture.

Add atomic specific data type definition.

Change the atomic specific data type to atomic.h and atomic.inl.

dos2unix the file atomic.inl.

Import the implementation of i386 architecture atomic from FreeBSD
to Rtems.

delete all the tab.

Add the atomic load and store implementation for i386

Add a atomic.h to rtems/rtems/atomic.h to export atomic API to
applications.

Add atomic load operation without any memory barrier option testsuit.

Add the all new file to according Makefile.am.

Modify the spatomic01 test function option.

Add some file to preinstall.am and change atomic test case to smp
mode.

Add the FreeBSD copyright declaration.

Modify the spatomic01 test case and run successfully on SMP mode.

Move the atomic test case to smptest and add atomic store test case

Modify the smpatomic02 test case to run successfully.

Add atomic add test case.

Modify some error in task.c

Add atomic sub operation test case.

Add atomic and operation test case.

Add atomic or operation test case.

Modify the random() to rand().

Add atomic compare exchange operation test case.

Correct the compare exchange implementation and make smpatomic07
test run successfully.

Add the log information for smpatomic3-7.scn.

Add acquire and release barrier option to test case for coverage
test not function test.

Modify the copyright for some files.

Change some atomic date type definition.

change atomic_cpu.h to cpuatomic.h

add cpuatomic.h.

Add a genericcpuatomic.h file to define generic atomic data type.