diff options
| author | Amlal El Mahrouss <amlal@nekernel.org> | 2026-03-08 15:11:13 +0100 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal@nekernel.org> | 2026-03-08 15:11:13 +0100 |
| commit | a3093cbf5746993148f1621f7f80c6d093d65dbb (patch) | |
| tree | e8a62112a0f3a6937320bd26a827c0d75cad0140 /include/GenericsLibrary | |
| parent | 5fbec948d16f63c5847e8e27b4fafc9c081c76fd (diff) | |
[CHORE] GenericsLibrary: pstd, swap: Free function implementation update.
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'include/GenericsLibrary')
| -rw-r--r-- | include/GenericsLibrary/pstd.nhh | 5 | ||||
| -rw-r--r-- | include/GenericsLibrary/swap.nhh | 3 |
2 files changed, 6 insertions, 2 deletions
diff --git a/include/GenericsLibrary/pstd.nhh b/include/GenericsLibrary/pstd.nhh index e089746..e595437 100644 --- a/include/GenericsLibrary/pstd.nhh +++ b/include/GenericsLibrary/pstd.nhh @@ -16,12 +16,17 @@ extern __nrt_pthread_kill; //@ Parallel free let pfree(let ptr) { + if (ptr := 0) return 0; return __nrt_pfree(ptr); } //@ Parallel alloc (bytes) let palloc(let type, let sz, let align := 0) { + if (0 := align) return 0; + if (0 := type) return 0; + if (0 := sz) return 0; + return __nrt_palloc(type, sz, align); } diff --git a/include/GenericsLibrary/swap.nhh b/include/GenericsLibrary/swap.nhh index 01d24da..5575bed 100644 --- a/include/GenericsLibrary/swap.nhh +++ b/include/GenericsLibrary/swap.nhh @@ -13,8 +13,7 @@ let swap(let a, let b) let temp := a; a := b; b := temp; - - return; + return temp; } #endif //@ NECTAR_GL_SWAP_NHH
\ No newline at end of file |
