⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 solaris_i386.s

📁 关系型数据库 Postgresql 6.5.2
💻 S
字号:
/=============================================================================/ tas.s -- test and set lock for solaris_i386/=============================================================================        .file   "tas.s"        .text        .align  16.L1.text:        .globl  tastas:        pushl   %ebp            /save prev base pointer        movl    %esp,%ebp       /new base pointer        pushl   %ebx            /save prev bx        movl    8(%ebp),%ebx    /load bx with address of lock        movl    $255,%eax       /put something in ax        xchgb   %al,(%ebx)      /swap lock value with "0"        cmpb    $0,%al          /did we get the lock?        jne     .Locked        subl    %eax,%eax       /yes, we got it -- return 0        jmp     .Finish        .align  4.Locked:        movl    $1,%eax         /no, we didn't get it - return 1.Finish:        popl    %ebx            /restore prev bx        movl    %ebp,%esp       /restore stack state        popl    %ebp        ret                     /return        .align  4        .type   tas,@function        .size   tas,.-tas

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -