Groups
Groups
Sign in
Groups
Groups
amulet
Conversations
About
Send feedback
Help
libatomic有问题
9 views
Skip to first unread message
eSX
unread,
Jul 4, 2011, 1:18:53 PM
7/4/11
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to amulet-...@googlegroups.com
像在386行的这个函数,atomic32_sub_return( int i, atomic64 *v ),使用了atomic64,这东西在32bit下编译不通过,因为32bit下没定义atomic64。
--
eSX
戴楠
unread,
Jul 5, 2011, 5:48:25 AM
7/5/11
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to amulet-...@googlegroups.com
已经修复 @ svn rev 88
D13
esx
unread,
Jul 5, 2011, 6:38:44 AM
7/5/11
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to amulet
另外我认为typedef volatile long atomic64;应该改为typedef volatile intptr_t
atomic64;
intptr_t是随指针大小变化的整形的意思,可以保证在64bit指针下是64bit整数,32bit指针下是32bit整数。
这个类型是C99标准中的,目前多数编译器应该都支持。
long类型在win32下tmd还是32bit的,所以可能会对可移植性产生问题。
戴楠
unread,
Jul 5, 2011, 12:03:07 PM
7/5/11
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to amulet-...@googlegroups.com
貌似还要找另外一个用于在所有情况下都是64位的变量。
intptr_t可以随编译环境调整成32bit和64bit,但是那些汇编语句不会,比如64位下add是addq,32位下则是addl。
D13
Reply all
Reply to author
Forward
0 new messages