Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/omega-mv/blob/main/seed/host/tests/fdsync.om # omega-mv Omega: a language for verified programs, semantic identity and machine realization. Seed-born work and existing implementations have distinct provenance. Brought by drakestapleton Sign in to star 1 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `omega-mv / seed / host / tests / fdsync.om` 54 lines ยท 607 bytes Raw Blame History 1 text p "dsync.tmp" 2 text body "abcd" 3 text name "mfd" 4 fn main to int 5 fd = int fopen p 0 len p 578 420 6 if lt fd 0 7 ret 1 8 end 9 w = write fd body 0 len body 10 if ne w long len body 11 ret 2 12 end 13 r = fdsync fd 14 if ne r 0 15 ret 3 16 end 17 r = fclose fd 18 if ne r 0 19 ret 4 20 end 21 r = fdsync fd 22 if ge r 0 23 ret 5 24 end 25 r = unlink p 0 len p 26 if ne r 0 27 ret 6 28 end 29 m = int memfd name 0 len name 0 30 if lt m 0 31 ret 7 32 end 33 w = write m body 0 len body 34 if ne w long len body 35 ret 8 36 end 37 r = fseek m 0 0 38 if ne r 0 39 ret 9 40 end 41 buf = new uchar 4 0 42 n = read m buf 0 4 43 if ne n 4 44 ret 10 45 end 46 if ne get buf 0 97 47 ret 11 48 end 49 r = fclose m 50 if ne r 0 51 ret 12 52 end 53 ret 0 54 end