Commit Graph

1473 Commits

Author SHA1 Message Date
gingerBill
24fce21d90 Add "naked" calling convention (removes prologue and epilogue) 2021-04-28 10:49:30 +01:00
gingerBill
ffffb04d85 Remove unused import 2021-04-27 17:21:52 +01:00
gingerBill
17390cd317 Implement sync2.Recursive_Mutex using WaitOnAddress and friends on Windows 2021-04-27 17:19:12 +01:00
gingerBill
7ac80544a1 Max sync2.Sema on windows be i32 for the counter internally. 2021-04-27 16:59:25 +01:00
gingerBill
96b60d8779 Reimplement sync2.Sema on windows with WaitOnAddress primitives 2021-04-27 16:56:11 +01:00
gingerBill
e7e1866e50 Fix #893 2021-04-27 13:09:37 +01:00
gingerBill
6667b78c12 Correct core:os/os2 mock-up 2021-04-26 22:08:15 +01:00
gingerBill
6d1eb473cf Correct \n ignore rules 2021-04-26 21:25:44 +01:00
gingerBill
9ed826f6fb Remove import "core:runtime" from core:math/bits 2021-04-25 21:51:33 +01:00
gingerBill
2691c394e0 Add intrinsics.count_zeros 2021-04-25 20:50:25 +01:00
gingerBill
7086b49ae6 Rename intrinsics to count_trailing_zeros and count_leading_zeros 2021-04-25 20:26:11 +01:00
gingerBill
72aa0e6e38 Replace many foreign llvm calls with intrinsics 2021-04-25 20:22:26 +01:00
gingerBill
cb2e6ea31d Remove use_llvm_api related checks and other related things 2021-04-25 20:03:05 +01:00
gingerBill
ad953c4670 Add cast on S_ISDIR 2021-04-24 21:08:15 +01:00
gingerBill
bd31a99bf7 Remove redundant auto_cast 2021-04-23 09:50:26 +01:00
gingerBill
d33350e3a5 Add truncate_to_byte and truncate_to_rune for packages strings and bytes 2021-04-22 15:49:10 +01:00
gingerBill
0a66f8c9a3 Remove intrinsics.x86_mmx type 2021-04-22 10:39:20 +01:00
gingerBill
158e4c0b6c Add @(cold) tag 2021-04-22 10:35:37 +01:00
gingerBill
47c7dc6a9b Add new intrinsics: debug_trap, trap, read_cycle_counter, expect 2021-04-22 10:35:17 +01:00
André
22867ec6f0 fix variable name in path_unix
replace the immutable variable "path" (that is a parameter) with a new variable "path_str"
2021-04-20 22:09:10 +02:00
gingerBill
e9b1d4f633 Fix #906 2021-04-20 10:34:41 +01:00
gingerBill
c3b3194a00 Update builtin procedures to support the new allocator features (without breaking other code) 2021-04-19 22:44:20 +01:00
gingerBill
f98c4d6837 Improve the Allocator interface to support returning Allocator_Error to allow for safer calls
Virtually all code (except for user-written custom allocators) should work as normal. Extra features will need to be added to make the current procedures support the `Allocator_Error` return value (akin to #optional_ok)
2021-04-19 12:31:31 +01:00
gingerBill
ae04af4e4e Add package flags 2021-04-18 20:19:03 +01:00
gingerBill
b59e110fec Add calling_convention to Type 2021-04-18 19:26:36 +01:00
gingerBill
2ce9873464 Remove dead comment 2021-04-18 18:53:19 +01:00
gingerBill
986844a0f0 Change elem_counts to i64le from u64 2021-04-18 18:48:56 +01:00
gingerBill
7c1f538c02 Change u32 to u32le 2021-04-18 18:46:29 +01:00
gingerBill
2f1c896290 Add -doc-format command for the new .odin-doc file format (to be used to generate documentation tools) 2021-04-18 18:33:15 +01:00
gingerBill
8827818b1d Clean-up fallback io.read_at and io.write_at behaviour 2021-04-14 21:25:46 +01:00
gingerBill
e19958152a Fix floattidf 2021-04-14 20:45:05 +01:00
gingerBill
05a181d719 Fix style issues; Use new attribute @(cold) where appropriate in the new sync package 2021-04-14 20:19:02 +01:00
gingerBill
d24784074c Add extra error to io.Error 2021-04-14 20:17:54 +01:00
gingerBill
cd2476e084 Add buffer_read_at buffer_write_at 2021-04-14 20:13:26 +01:00
gingerBill
ebbc33fdb5 Mockup of the new package os interface (incomplete and non-functioning) 2021-04-14 19:39:12 +01:00
gingerBill
3e54cddf64 Merge pull request #902 from Kelimion/run_as_user
Add support to core:windows to add/delete users.
2021-04-14 12:15:30 +01:00
gingerBill
d602709133 Fix typo 2021-04-14 12:14:44 +01:00
gingerBill
8e1120bc09 Fix typo 2021-04-13 19:23:12 +01:00
gingerBill
ebed29fc09 Revert *nix thread stuff to old sync
(I was just testing)
2021-04-13 19:09:04 +01:00
gingerBill
bee8beb2c9 Default to pthreads in sync2 for *nix 2021-04-13 19:04:44 +01:00
Jeroen van Rijn
2942e45ff5 Placate -vet for unrelated core:thread update. 2021-04-13 02:23:14 +02:00
Jeroen van Rijn
aca5c7c1c6 Placate -vet. 2021-04-13 02:18:47 +02:00
Jeroen van Rijn
a1d871360c Add support to core:windows to add/delete users.
main :: proc() {

	using fmt;
	using windows;

	username := "testuser";
	password := "testpass";

	ok := add_user("", username, password);
	fmt.printf("add_user: %v\n", ok);
	pi := windows.PROCESS_INFORMATION{};

	ok2, path := windows.add_user_profile(username);
	fmt.printf("add_user_profile: %v, %v\n", ok2, path);

	ok3 := windows.delete_user_profile(username);
	fmt.printf("delete_user_profile: %v\n", ok3);

	ok4 := windows.delete_user("", username);
	fmt.printf("delete_user: %v\n", ok4);

	// Has optional bool to not wait on the process before returning.
	b := run_as_user(username, password, "C:\\Repro\\repro.exe", "Hellope!", &pi);
	fmt.printf("run_as_user: %v %v\n", b, pi);
}
2021-04-13 02:09:44 +02:00
gingerBill
2b36069924 Fix typo 2021-04-12 17:13:05 +01:00
gingerBill
4fb4ada2c7 Update sync2 to just use atomic intrinsics rather than the parapoly wrappers 2021-04-12 15:22:40 +01:00
gingerBill
e3ee005404 Clean up path_unix.odin to make it not depend on package os 2021-04-11 19:05:01 +01:00
gingerBill
1156bd9dd0 Remove thread stuff from sync2; Cleanup package thread 2021-04-11 18:25:56 +01:00
gingerBill
52c193316b Add Thread stuff to new sync package 2021-04-11 15:36:55 +01:00
gingerBill
2db1fe7429 New redesign of core:sync (stored under core:sync/sync2 for the time being) 2021-04-11 15:18:28 +01:00
vassvik
8169cb4853 Fix missing newlines in core:math/linalg/specific.odin 2021-04-09 09:21:20 +02:00