فهرست منبع

* make FUTEX_OP implemented also with FPC_USE_LIBC since it's a macro

git-svn-id: trunk@7972 -
Almindor 18 سال پیش
والد
کامیت
1fa4e17c87
1فایلهای تغییر یافته به همراه6 افزوده شده و 5 حذف شده
  1. 6 5
      rtl/linux/linux.pp

+ 6 - 5
rtl/linux/linux.pp

@@ -228,6 +228,12 @@ function epoll_wait(epfd: cint; events: pepoll_event; maxevents, timeout: cint):
 
 implementation
 
+// FUTEX_OP is a macro, doesn't exist in libC as function
+function FUTEX_OP(op, oparg, cmp, cmparg: cint): cint; {$ifdef SYSTEMINLINE}inline;{$endif}
+begin
+  FUTEX_OP := ((op and $F) shl 28) or ((cmp and $F) shl 24) or ((oparg and $FFF) shl 12) or (cmparg and $FFF);
+end;
+
 {$ifndef FPC_USE_LIBC}
 uses Syscall;
 
@@ -236,11 +242,6 @@ begin
   Sysinfo := do_SysCall(SysCall_nr_Sysinfo,TSysParam(@info))=0;
 end;
 
-function FUTEX_OP(op, oparg, cmp, cmparg: cint): cint; {$ifdef SYSTEMINLINE}inline;{$endif}
-begin
-  FUTEX_OP := ((op and $F) shl 28) or ((cmp and $F) shl 24) or ((oparg and $FFF) shl 12) or (cmparg and $FFF);
-end;
-
 function epoll_create(size: cint): cint;
 begin
   epoll_create := do_syscall(syscall_nr_epoll_create,tsysparam(size));