flysand7
4d65b1ab9c
Implement new sys/unix package
2023-10-27 10:51:21 +11:00
gingerBill
35857d3103
Fix wrong type
2023-09-12 23:01:49 +01:00
Rickard Andersson
f048ad13b5
fix(set_env): use clone_to_cstring instead of unsafe_to_cstring
2023-06-27 21:48:53 +03:00
Rickard Andersson
d03d5d8f03
style: use tabs
...
:[
2023-06-27 21:46:00 +03:00
Rickard Andersson
6ff0ce15e7
cleanup: remove leftover line
2023-06-27 21:42:20 +03:00
Rickard Andersson
330b393e16
fix(os): use setenv instead of putenv
...
`setenv` doesn't copy the value that is put, which means that the
previous code had a bug where we free'd the temporary memory and the
environment was accidentally cleared right after the function finished.
2023-06-27 21:37:10 +03:00
Rickard Andersson
37469dc9c2
fix(poll): make interface more odinary
...
We take `fds` as a normal slice and get the length from it instead of
bothering with a second parameter.
2023-06-15 16:10:00 +03:00
Rickard Andersson
a5ed5883c7
cleanup: more tabs
2023-06-14 23:59:09 +03:00
Rickard Andersson
d6540d9077
fix(os_linux): call ppoll instead on arm64
2023-06-14 23:26:43 +03:00
Rickard Andersson
091c515fea
cleanup(os_linux): remove select
2023-06-14 22:34:57 +03:00
Rickard Andersson
4f2b9835f5
feat(unix): add poll
2023-06-14 22:13:36 +03:00
James Duran
fed0c2ea26
Fix Timeval for darwin and linux
2023-06-07 21:55:08 -07:00
Jon Lipstate
bbafc3fbd6
harmonize to use null for c-string endings
2023-03-28 11:57:12 -07:00
Jon Lipstate
194fa7cd98
rename nul to null, allocation clarifications
2023-03-28 11:51:39 -07:00
Sokus
1ecab2fcbc
Add set_blocking for network sockets
2023-03-08 13:30:12 +01:00
Colin Davidson
d569daae33
more manual type carryover
2023-03-01 08:17:41 -08:00
Colin Davidson
28f7f57247
manually start merging core_net
2023-03-01 07:58:30 -08:00
gingerBill
5b5154eda0
Add temp allocator guard; clean up indentation
2023-02-28 12:38:36 +00:00
gingerBill
9afd9f9bea
Merge branch 'master' into new-temp-allocator
2023-02-28 12:15:54 +00:00
Colin Davidson
edd78ae129
cleanup of os/linux
2023-02-28 01:17:43 -08:00
Colin Davidson
04b1023988
make file access a little more normal across platforms
2023-02-14 18:34:03 -08:00
gingerBill
986cba584e
Add runtime.DEFAULT_TEMP_ALLOCATOR_TEMP_GUARD where appropriate
2023-02-10 16:23:33 +00:00
gingerBill
b6ca10cd5e
Fix memory leak in os.get_current_directory on failure on *nix systems
2023-01-16 15:29:45 +00:00
Colin Davidson
6ff2db47b4
shuffle to private/public wrapper
2023-01-06 13:33:47 -08:00
Colin Davidson
944396128b
add get core count
2023-01-05 01:06:55 -08:00
gingerBill
ffe953b43d
Make os.get_last_error contextless
2022-12-08 16:04:03 +00:00
gingerBill
7f601c9535
Add Allocator_Mode.Alloc_Non_Zerored
2022-09-22 12:12:57 +01:00
gingerBill
cb9e16f4df
Correct syscalls for linux_i386
2022-08-24 12:37:56 +01:00
Tetralux
57167be2a6
[os] Linux: os.unset_env()
2022-05-18 07:12:30 +00:00
Tetralux
b5b329378f
[os] Linux: Add os.exists(), os.get_env(), os.lookup_env(), os.set_env()
...
exists() does the access() syscall.
Renames getenv() to get_env() to match Windows.
2022-05-14 20:14:10 +00:00
gingerBill
5d190b15d7
Minor improvements to io and os
2022-05-05 15:30:07 +01:00
Sébastien Marie
8982ae34e3
fix linux_arm64
...
- SYS_fork doesn't exist, uses SYS_clone
- properly cast AT_FDCWD to uintptr
2022-03-12 09:19:52 +00:00
gingerBill
17eebf338c
Fix #1606 (Call runtime._cleanup_runtime_contextless() for os.exit)
2022-03-09 15:05:51 +00:00
Sébastien Marie
14f1793b3e
use context.temp_allocator instead of general allocation + delete()
...
where clone_to_cstring is used with foreign code, it is prefered to use `context.temp_allocator` instead of using the general allocator and manually delete the memory after use.
2022-02-24 11:28:42 +00:00
Colin Davidson
54a6637d38
Use the _unix_fstat pointer to avoid 144B copies on fileIO
2022-02-18 20:50:49 -08:00
Colin Davidson
536bf61323
avoid memset on stats
2022-02-16 08:14:11 -08:00
Jeroen van Rijn
855e7beab1
Merge pull request #1488 from colrdavidson/master
...
Add fork and personality
2022-02-15 21:04:09 +01:00
gingerBill
f5697dd7f2
Merge branch 'master' into odin-global-constants-as-enums
2022-02-15 15:47:24 +00:00
Colin Davidson
f77cd5533d
Add fork and personality
2022-02-11 08:10:48 -08:00
gingerBill
fb710f8cbf
Merge pull request #1376 from jasonKercher/master
...
Added zeroing to new memory regions from _unix_realloc
2022-02-05 12:26:10 +00:00
gingerBill
3d7d347192
Convert ODIN_OS and ODIN_ARCH to use enums rather than use strings
2022-01-20 19:56:05 +00:00
CiD-
8eaafd5242
check correct errno in _readlink
2022-01-12 14:51:49 -05:00
CiD-
774951e8c0
os_linux additions + libc to syscalls
2022-01-12 14:36:18 -05:00
CiD-
ebdb3ab43a
added notes about _unix_alloc
2021-12-17 12:04:05 -05:00
Yawning Angel
61c581baeb
core/sys/unix: Add syscalls_linux.odin
...
Linux is in the unfortunate situation where the system call number is
architecture specific. This consolidates the system call number
definitions in a single location, adds some wrappers, and hopefully
fixes the existing non-portable invocations of the syscall intrinsic.
2021-11-17 14:00:00 +00:00
gingerBill
ca33cb990b
Strip semicolons in core which were missing
2021-09-08 13:12:38 +01:00
gingerBill
5f29288254
Remove Syscall type
2021-08-29 15:00:35 +01:00
gingerBill
7c108dbf48
Update usage of syscall to use the intrinsics
2021-08-29 14:56:47 +01:00
gingerBill
19aefa6a40
Add assignment statement to #no_bounds_check etc rules. Correct os_linux.odin usage.
2021-08-15 11:14:34 +01:00
gingerBill
465b6139d5
Temporarily fix syscall in Linux and Freebsd (eventually to be replaced with a proper implementation)
2021-05-13 12:05:23 +01:00