Browse Source

* optimization in WebAssembly's MutexKind() function - mark the first parameter
as const, to avoid making a copy on the stack

Nikolay Nikolov 1 year ago
parent
commit
8413c2b073
1 changed files with 1 additions and 1 deletions
  1. 1 1
      rtl/wasi/wasmmutex.inc

+ 1 - 1
rtl/wasi/wasmmutex.inc

@@ -8,7 +8,7 @@ Type
   TMutexKind = (mkNormal,mkRecursive);
   TMutexKind = (mkNormal,mkRecursive);
   TLockMutexResult = (lmrNone,lmrOK,lmrNotOwner,lmrError,lmrTimeout);
   TLockMutexResult = (lmrNone,lmrOK,lmrNotOwner,lmrError,lmrTimeout);
 
 
-Function MutexKind(M : TWasmMutex) : TMutexKind;
+Function MutexKind(const M : TWasmMutex) : TMutexKind;
 
 
 begin
 begin
   Result:=TMutexKind(M.Kind);
   Result:=TMutexKind(M.Kind);