Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Lock Free Data Structure

11 views
Skip to first unread message

nithesh

unread,
Feb 28, 2009, 2:56:58 AM2/28/09
to
Hi,

I am a beginner in lock free datastructure.. I have downloaded Appcore
source files from http://webpages.charter.net/appcore. appcore has
provided an asm file named ac_i686_masm.asm. This file gives following
compile time error::
ac_i686_atomic_inc_fence redefined
Platform used : Red Hat 3.4.3-9
In case if any one has used appcore please let me know how to compile
the asm file and create so file.


Please let me know other than appcore is there any other lock free
datastructure library available for linux.
Thanks,
Nithesh

Chris M. Thomasson

unread,
Feb 28, 2009, 3:32:04 AM2/28/09
to
"nithesh" <nit...@gmail.com> wrote in message
news:7883680b-5449-4818...@i20g2000prf.googlegroups.com...
> datastructure library available for Linux.

Are you compiling entire library? You on Linux right? Arte you using MingW?
Well, please correct me if I am wrong, but `ac_i686_masm.asm' is a Microsoft
specific file (MASM). I just assembled it with MASM on Windows. However,
IMVHO, this is meaningless to you; Okay:

Try assembling this single file with GAS right now:

http://webpages.charter.net/appcore/appcore/src/cpu/i686/ac_i686_gcc_asm.html

Use common way to assemble using `AS' in the command line; simple. You need
to assemble this file into object file and link into main library.


You simply cannot use GAS to assembly Intel syntax library. Sorry about
that; well shi% happens. GAS expects AT&T. If your on Windows, try using GAS
with the following file:


http://webpages.charter.net/appcore/appcore/src/cpu/i686/ac_i686_mingw_asm.html

Please, keep me informed. There might be several hour delays in my
responses, but I am here to help you.


Chris M. Thomasson.

Chris M. Thomasson

unread,
Feb 28, 2009, 3:33:34 AM2/28/09
to
"nithesh" <nit...@gmail.com> wrote in message
news:7883680b-5449-4818...@i20g2000prf.googlegroups.com...

Check here:

http://atomic-ptr-plus.sourceforge.net

Chris M. Thomasson

unread,
Feb 28, 2009, 3:42:29 AM2/28/09
to
"Chris M. Thomasson" <n...@spam.invalid> wrote in message
news:UC6ql.15747$l71...@newsfe23.iad...

> "nithesh" <nit...@gmail.com> wrote in message
> news:7883680b-5449-4818...@i20g2000prf.googlegroups.com...
>> Hi,
>>
>> I am a beginner in lock free datastructure.. I have downloaded Appcore
>> source files from http://webpages.charter.net/appcore. appcore has
>> provided an asm file named ac_i686_masm.asm. This file gives following
>> compile time error::
>> ac_i686_atomic_inc_fence redefined
>> Platform used : Red Hat 3.4.3-9
>> In case if any one has used appcore please let me know how to compile
>> the asm file and create so file.
>>
>>
>> Please let me know other than appcore is there any other lock free
>> datastructure library available for Linux.
>
> Are you compiling entire library? You on Linux right? Arte you using
> MingW? Well, please correct me if I am wrong, but `ac_i686_masm.asm' is a
> Microsoft specific file (MASM). I just assembled it with MASM on Windows.
> However, IMVHO, this is meaningless to you; Okay:
>
> Try assembling this single file with GAS right now:
>
> http://webpages.charter.net/appcore/appcore/src/cpu/i686/ac_i686_gcc_asm.html
> [...]
>
>
> http://webpages.charter.net/appcore/appcore/src/cpu/i686/ac_i686_mingw_asm.html

I just assemble the following with mingw:

http://webpages.charter.net/appcore/appcore/src/cpu/i686/ac_i686_mingw_asm.html

works fine.

I just assemble:

http://webpages.charter.net/appcore/appcore/src/cpu/i686/ac_i686_gcc_asm.html


works fine.

Please show me exact command line you using to assemble on Linux? I am very
interested.

Chris M. Thomasson

unread,
Feb 28, 2009, 3:48:43 AM2/28/09
to

"Chris M. Thomasson" <n...@spam.invalid> wrote in message
news:DM6ql.15755$l71....@newsfe23.iad...

I also just assembled the file on Solaris (e.g. via GCC) and it works fine.


Please give me exact command line, and environment variables. I am most
interested. It should assemble in to object file just fine. What arch and
platform are you on?

Chris M. Thomasson

unread,
Feb 28, 2009, 3:57:31 AM2/28/09
to

"Chris M. Thomasson" <n...@spam.invalid> wrote in message
news:jE6ql.15751$l71....@newsfe23.iad...

also make sure to check here:

http://www.cl.cam.ac.uk/research/srg/netos/lock-free

and here of course!:

http://research.sun.com/scalable


I am very sorry for any inconvenience. Please keep me informed of your
struggles with AppCore, or any lock-free algo for that matter; also, keep
this NG in mind.

Chris M. Thomasson

unread,
Feb 28, 2009, 4:02:29 AM2/28/09
to

"nithesh" <nit...@gmail.com> wrote in message
news:7883680b-5449-4818...@i20g2000prf.googlegroups.com...


No makefile in AppCore. I expect you to be able to work with the sources
files and assemble assembles as is.

Chris M. Thomasson

unread,
Feb 28, 2009, 4:07:30 AM2/28/09
to

"Chris M. Thomasson" <n...@spam.invalid> wrote in message
news:n37ql.15764$l71....@newsfe23.iad...


BTW, how did you even get GAS to give you a single error? I try to assemble
the MASM file with GAS on several Unix x86-32 archs and I get a boat load of
errors. Here is some of what I get via MingW:


whoot.asm: Assembler messages:
whoot.asm:1: Error: no such instruction: `copyright 2005 Chris Thomasson'
whoot.asm:4: Error: unknown pseudo-op: `.686'
whoot.asm:5: Error: unknown pseudo-op: `.xmm'
whoot.asm:6: Error: unknown pseudo-op: `.model'
whoot.asm:7: Error: unknown pseudo-op: `.code'
whoot.asm:12: Error: no such instruction: `align 16'
whoot.asm:13: Error: invalid character '_' in mnemonic
whoot.asm:16: Error: invalid char '[' beginning operand 2 `[esp+16]'
whoot.asm:17: Error: invalid char '[' beginning operand 2 `[esi]'
whoot.asm:18: Error: invalid char '[' beginning operand 2 `[esi+4]'
whoot.asm:19: Error: invalid char '[' beginning operand 2 `[esp+20]'
whoot.asm:20: Error: invalid char '[' beginning operand 2 `[esi]'
whoot.asm:21: Error: invalid char '[' beginning operand 2 `[esi+4]'
whoot.asm:22: Error: invalid char '[' beginning operand 2 `[esp+12]'
whoot.asm:23: Error: junk `ptr [esi]' after expression
whoot.asm:25: Error: too many memory references for `xor'
whoot.asm:31: Error: invalid char '[' beginning operand 2 `[esp+16]'
whoot.asm:32: Error: invalid char '[' beginning operand 1 `[esi+0]'
whoot.asm:33: Error: invalid char '[' beginning operand 1 `[esi+4]'
whoot.asm:34: Error: too many memory references for `mov'
whoot.asm:38: Error: invalid character '_' in mnemonic
whoot.asm:43: Error: no such instruction: `align 16'
whoot.asm:44: Error: invalid character '_' in mnemonic
whoot.asm:45: Error: invalid char '[' beginning operand 2 `[esp+4]'
whoot.asm:46: Error: invalid char '[' beginning operand 2 `[edx]'
whoot.asm:47: Error: invalid char '[' beginning operand 2 `[esp+8]'
whoot.asm:50: Error: invalid char '[' beginning operand 1 `[ecx]'
whoot.asm:51: Error: invalid char '[' beginning operand 1 `[edx]'
whoot.asm:54: Error: invalid character '_' in mnemonic
whoot.asm:59: Error: no such instruction: `align 16'
whoot.asm:60: Error: invalid character '_' in mnemonic
whoot.asm:65: Error: invalid char '[' beginning operand 2 `[esp+12]'
whoot.asm:66: Error: invalid char '[' beginning operand 2 `[esi+4]'
whoot.asm:67: Error: invalid char '[' beginning operand 2 `[esi]'
whoot.asm:70: Error: invalid char '[' beginning operand 2 `[esp+16]'
whoot.asm:71: Error: invalid char '[' beginning operand 1 `[ebx]'
whoot.asm:73: Error: invalid char '[' beginning operand 2 `[esi]'
whoot.asm:75: Error: too many memory references for `test'
whoot.asm:77: Error: invalid char '[' beginning operand 2 `[eax]'
whoot.asm:78: Error: invalid char '[' beginning operand 2 `[edx+1]'
whoot.asm:79: Error: junk `ptr [esi]' after expression
whoot.asm:83: Error: invalid char '[' beginning operand 2 `[esp+16]'
whoot.asm:84: Error: too many memory references for `xor'
whoot.asm:85: Error: invalid char '[' beginning operand 1 `[esi]'
whoot.asm:89: Error: invalid character '_' in mnemonic
whoot.asm:94: Error: no such instruction: `align 16'
whoot.asm:95: Error: invalid character '_' in mnemonic
whoot.asm:98: Error: invalid char '[' beginning operand 2 `[esp+12]'
whoot.asm:99: Error: invalid char '[' beginning operand 2 `[esi+4]'
whoot.asm:100: Error: invalid char '[' beginning operand 2 `[esi]'
whoot.asm:103: Error: too many memory references for `test'
whoot.asm:105: Error: invalid char '[' beginning operand 2 `[eax]'
whoot.asm:106: Error: invalid char '[' beginning operand 2 `[edx+1]'
whoot.asm:107: Error: junk `ptr [esi]' after expression
whoot.asm:114: Error: invalid character '_' in mnemonic
whoot.asm:119: Error: no such instruction: `align 16'
whoot.asm:120: Error: invalid character '_' in mnemonic
whoot.asm:121: Error: invalid char '[' beginning operand 2 `[esp+4]'
whoot.asm:122: Error: invalid char '[' beginning operand 2 `[esp+8]'
whoot.asm:123: Error: invalid char '[' beginning operand 2 `[eax+4]'
whoot.asm:124: Error: junk `be needed on future x86' after expression
whoot.asm:124: Error: suffix or operands invalid for `sfence'
whoot.asm:125: Error: invalid char '[' beginning operand 1 `[edx]'
whoot.asm:126: Error: invalid char '[' beginning operand 1 `[eax+4]'
whoot.asm:128: Error: invalid character '_' in mnemonic
whoot.asm:133: Error: no such instruction: `align 16'
whoot.asm:134: Error: invalid character '_' in mnemonic
whoot.asm:136: Error: invalid char '[' beginning operand 2 `[esp+8]'
whoot.asm:137: Error: invalid char '[' beginning operand 2 `[ecx]'
whoot.asm:138: Error: invalid char '[' beginning operand 2 `[ecx+4]'
whoot.asm:140: Error: invalid char '[' beginning operand 2 `[eax]'
whoot.asm:141: Error: junk `be needed on future x86' after expression
whoot.asm:141: Error: suffix or operands invalid for `lfence'
whoot.asm:142: Error: invalid char '[' beginning operand 2 `[edx+12]'
whoot.asm:143: Error: invalid char '[' beginning operand 1 `[ecx]'
whoot.asm:144: Error: invalid char '[' beginning operand 1 `[eax+12]'
whoot.asm:149: Error: too many memory references for `xor'
whoot.asm:152: Error: invalid character '_' in mnemonic
whoot.asm:157: Error: no such instruction: `align 16'
whoot.asm:158: Error: invalid character '_' in mnemonic
whoot.asm:159: Error: invalid char '[' beginning operand 2 `[esp+4]'
whoot.asm:160: Error: invalid char '[' beginning operand 2 `[esp+8]'
whoot.asm:163: Error: invalid char '[' beginning operand 2 `[ecx]'
whoot.asm:164: Error: invalid char '[' beginning operand 1 `[edx]'
whoot.asm:166: Error: invalid char '[' beginning operand 2 `[ecx]'
whoot.asm:169: Error: invalid character '_' in mnemonic
whoot.asm:174: Error: no such instruction: `align 16'
whoot.asm:175: Error: invalid character '_' in mnemonic
whoot.asm:176: Error: invalid char '[' beginning operand 2 `[esp+4]'
whoot.asm:177: Error: too many memory references for `xor'
whoot.asm:178: Error: invalid char '[' beginning operand 1 `[ecx]'
whoot.asm:180: Error: invalid character '_' in mnemonic
whoot.asm:185: Error: no such instruction: `align 16'
whoot.asm:186: Error: invalid character '_' in mnemonic
whoot.asm:189: Error: invalid character '_' in mnemonic
whoot.asm:194: Error: no such instruction: `align 16'
whoot.asm:195: Error: invalid character '_' in mnemonic
whoot.asm:197: Error: invalid character '_' in mnemonic
whoot.asm:202: Error: no such instruction: `align 16'
whoot.asm:203: Error: invalid character '_' in mnemonic
whoot.asm:204: Error: invalid char '[' beginning operand 2 `[esp+4]'
whoot.asm:205: Error: invalid char '[' beginning operand 2 `[esp+8]'
whoot.asm:207: Error: invalid char '[' beginning operand 1 `[ecx]'
whoot.asm:209: Error: invalid character '_' in mnemonic
whoot.asm:214: Error: no such instruction: `align 16'
whoot.asm:215: Error: invalid character '_' in mnemonic
whoot.asm:216: Error: invalid char '[' beginning operand 2 `[esp+4]'
whoot.asm:217: Error: invalid char '[' beginning operand 2 `[ecx]'
whoot.asm:220: Error: invalid character '_' in mnemonic
whoot.asm:225: Error: no such instruction: `align 16'
whoot.asm:226: Error: invalid character '_' in mnemonic
whoot.asm:227: Error: invalid char '[' beginning operand 2 `[esp+4]'
whoot.asm:228: Error: invalid char '[' beginning operand 2 `[esp+8]'
whoot.asm:229: Error: invalid char '[' beginning operand 1 `[ecx]'
whoot.asm:231: Error: invalid character '_' in mnemonic
whoot.asm:236: Error: no such instruction: `align 16'
whoot.asm:237: Error: invalid character '_' in mnemonic
whoot.asm:238: Error: invalid char '[' beginning operand 2 `[esp+4]'
whoot.asm:239: Error: invalid char '[' beginning operand 2 `[ecx]'
whoot.asm:241: Error: invalid character '_' in mnemonic
whoot.asm:246: Error: no such instruction: `align 16'
whoot.asm:247: Error: invalid character '_' in mnemonic
whoot.asm:248: Error: invalid char '[' beginning operand 2 `[esp+4]'
whoot.asm:249: Error: invalid char '[' beginning operand 2 `[esp+8]'
whoot.asm:250: Error: invalid char '[' beginning operand 1 `[ecx]'
whoot.asm:252: Error: invalid character '_' in mnemonic
whoot.asm:257: Error: no such instruction: `align 16'
whoot.asm:258: Error: invalid character '_' in mnemonic
whoot.asm:259: Error: invalid char '[' beginning operand 2 `[esp+4]'
whoot.asm:260: Error: invalid char '[' beginning operand 2 `[esp+8]'
whoot.asm:261: Error: invalid char '[' beginning operand 1 `[ecx]'
whoot.asm:263: Error: invalid character '_' in mnemonic
whoot.asm:268: Error: no such instruction: `align 16'
whoot.asm:269: Error: invalid character '_' in mnemonic
whoot.asm:270: Error: invalid char '[' beginning operand 2 `[esp+4]'
whoot.asm:271: Error: too many memory references for `mov'
whoot.asm:272: Error: invalid char '[' beginning operand 1 `[ecx]'
whoot.asm:273: Error: no instruction mnemonic suffix given and no register
operands
; can't size instruction
whoot.asm:275: Error: invalid character '_' in mnemonic
whoot.asm:280: Error: no such instruction: `align 16'
whoot.asm:281: Error: invalid character '_' in mnemonic
whoot.asm:282: Error: invalid char '[' beginning operand 2 `[esp+4]'
whoot.asm:283: Error: too many memory references for `mov'
whoot.asm:284: Error: invalid char '[' beginning operand 1 `[ecx]'
whoot.asm:285: Error: no instruction mnemonic suffix given and no register
operands
; can't size instruction
whoot.asm:287: Error: invalid character '_' in mnemonic
whoot.asm:292: Error: no such instruction: `align 16'
whoot.asm:293: Error: invalid character '_' in mnemonic
whoot.asm:294: Error: invalid char '[' beginning operand 2 `[esp+4]'
whoot.asm:295: Error: invalid char '[' beginning operand 2 `[esp+8]'
whoot.asm:296: Error: invalid char '[' beginning operand 2 `[esp+12]'
whoot.asm:297: Error: invalid char '[' beginning operand 1 `[ecx]'
whoot.asm:299: Error: invalid character '_' in mnemonic
whoot.asm:304: Error: no such instruction: `end'

Chris M. Thomasson

unread,
Feb 28, 2009, 9:49:40 PM2/28/09
to
"nithesh" <nit...@gmail.com> wrote in message
news:7883680b-5449-4818...@i20g2000prf.googlegroups.com...
> Hi,
>
> I am a beginner in lock free datastructure.. I have downloaded Appcore
> source files from http://webpages.charter.net/appcore. appcore has
> provided an asm file named ac_i686_masm.asm. This file gives following
> compile time error::
> ac_i686_atomic_inc_fence redefined
> Platform used : Red Hat 3.4.3-9
> In case if any one has used appcore please let me know how to compile
> the asm file and create so file.

as file_name -o object_file_name

Greg Herlihy

unread,
Mar 1, 2009, 3:08:59 AM3/1/09
to
On Feb 28, 1:07 am, "Chris M. Thomasson" <n...@spam.invalid> wrote:
> "Chris M. Thomasson" <n...@spam.invalid> wrote in messagenews:n37ql.15764$l71....@newsfe23.iad...
>
>
>
>
>
>
>
> > "nithesh" <nith...@gmail.com> wrote in message

> >news:7883680b-5449-4818...@i20g2000prf.googlegroups.com...
> >> Hi,
>
> >> I am a beginner in lock free datastructure.. I have downloaded Appcore
> >> source files fromhttp://webpages.charter.net/appcore. appcore has

> >> provided an asm file named ac_i686_masm.asm. This file gives following
> >> compile time error::
> >> ac_i686_atomic_inc_fence redefined
> >> Platform used : Red Hat 3.4.3-9
> >> In case if any one has used appcore please let me know how to compile
> >> the asm file and create so file.
>
> >> Please let me know other than appcore is there any other lock free
> >> datastructure library available for linux.
>
> > No makefile in AppCore. I expect you to be able to work with the sources
> > files and assemble assembles as is.
>
> BTW, how did you even get GAS to give you a single error? I try to assemble
> the MASM file with GAS on several Unix x86-32 archs and I get a boat load of
> errors. Here is some of what I get via MingW:
>
> whoot.asm: Assembler messages:
> whoot.asm:1: Error: no such instruction: `copyright 2005 Chris Thomasson'
> whoot.asm:4: Error: unknown pseudo-op: `.686'
> whoot.asm:5: Error: unknown pseudo-op: `.xmm'
> whoot.asm:6: Error: unknown pseudo-op: `.model'
> whoot.asm:7: Error: unknown pseudo-op: `.code'
> ,..,

There at least two problems with the assembly source file when
compiling on UNIX. The source file's line endings need to be LF, not
CRLF. Second, the source file contains ".align 16" directives when
"15" (meaning 2^15 or 32,768) is the maximum allowed alignment value.
Presumably, the align directive is attempting to align to a 16-byte
boundary, in which case ".align 4" (2^4 = 16) would be correct.

Greg


Chris Thomasson

unread,
Mar 1, 2009, 5:09:48 AM3/1/09
to
OUCH!


On Sun, 01 Mar 2009 00:08:59 -0800, Greg Herlihy wrote:

> On Feb 28, 1:07 am, "Chris M. Thomasson" <n...@spam.invalid> wrote:
>> "Chris M. Thomasson" <n...@spam.invalid> wrote in

>> [...]


>> BTW, how did you even get GAS to give you a single error? I try to
>> assemble the MASM file with GAS on several Unix x86-32 archs and I get
>> a boat load of errors. Here is some of what I get via MingW:
>>
>> whoot.asm: Assembler messages:
>> whoot.asm:1: Error: no such instruction: `copyright 2005 Chris
>> Thomasson' whoot.asm:4: Error: unknown pseudo-op: `.686' whoot.asm:5:
>> Error: unknown pseudo-op: `.xmm' whoot.asm:6: Error: unknown pseudo-op:
>> `.model' whoot.asm:7: Error: unknown pseudo-op: `.code' ,..,
>
> There at least two problems with the assembly source file when compiling
> on UNIX. The source file's line endings need to be LF, not CRLF.

Yes; you are correct. Well, at least the assembler does not barf it up on
Linux Fedora Core.

:^o


> Second,
> the source file contains ".align 16" directives when "15" (meaning 2^15
> or 32,768) is the maximum allowed alignment value. Presumably, the align
> directive is attempting to align to a 16-byte boundary, in which case
> ".align 4" (2^4 = 16) would be correct.

Thank you; I will try and upload corrected files ASAP. BTW, can you point
me to some docs that explain this limitation? I cannot seem to find it.

Again, thanks!

George Peter Staplin

unread,
Mar 1, 2009, 11:47:30 PM3/1/09
to
Greg Herlihy wrote:

.align 4 doesn't align to a 16-byte multiple with GNU as.

The binutils info pages say the following according to:
info as "Pseudo Ops" "Align"

"Pad the location counter (in the current subsection) to a particular
storage boundary."

"For example `.align 8' advances the location counter until it is a multiple
of 8. If the location counter is already a multiple of 8, no change is
needed."

George

0 new messages