Commit Graph

47 Commits

Author SHA1 Message Date
Andreas T Jonsson
f428e30211 Minor code cleanup 2024-05-10 17:49:56 +02:00
Andreas T Jonsson
7feff1c113 Merged with master 2024-05-02 09:27:46 +02:00
Laytan Laats
c0ca26ac17 sys/info: add missing @(private)'s 2024-04-30 00:24:09 +02:00
Laytan Laats
b41395e3b4 sys/info: update doc.odin 2024-04-30 00:24:09 +02:00
Laytan Laats
d40c207fde sys/info: retrieve better CPU description on Darwin
Previously either `ARM` or `ARM64`, now you get something like `Apple
M1`
2024-04-30 00:24:09 +02:00
Laytan Laats
8660718ebe sys/info: add feature detection for Darwin and Linux ARM 2024-04-30 00:24:09 +02:00
Laytan Laats
485afb011c sys/info: improve platform_linux
1. fix the `linux.open` call, passing `{ .RDONLY }` becomes `0x00000001`
   while `RDONLY` is supposed to be `0x00000000`
2. fix the case where `/etc/os-release` starts with `PRETTY_NAME`
   `strings.index` was used but was checking `> 0` while `0` is valid
3. remove unneccesary temporary allocations
4. simplify the logic
2024-04-30 00:24:09 +02:00
Laytan Laats
9e94e9dac1 sys/info: remove unneccesary build tags 2024-04-30 00:24:09 +02:00
Laytan Laats
e896efdaeb sys/info: add easy way of getting the MacOS version 2024-04-30 00:24:09 +02:00
Andreas T Jonsson
6bbdbb4447 Added missing core:sys/info package for NetBSD 2024-04-26 11:04:27 +02:00
Andreas T Jonsson
9a008d10f3 Merge branch 'master' into netbsd 2024-04-25 22:04:40 +02:00
Andreas T Jonsson
dd95a8d11d More std lib fixes
Just selecting the same codepath as other BSD's for the most part.
2024-04-19 10:42:09 +02:00
Maurizio M. Gavioli
a0cff82320 Fix the format of some doc.odin files of the core library which did not made into the documentation.
`c/frontend/tokenizer`:
   add proper "Example:" header to demo example code,
   removed empty lines.
`container/bit_array`:
   moved comment before package;
   aligned narrative lines to left margin;
   converted case lines into bulleted lines ("- ");
   converted individual examples to single-tab-indented preformatted text.
`dynlib`:
   removed "//+build ignore" line;
   added newline at EOF.
`image/netpmb`:
   converted indented lines of "Reading", "Wrting" and "Some syntax..." into bulleted lists;
   "Formats" indented lines kept as they are as the preformatted text seems relevant to keep the alignments;
   doubly indented lines kept as single-indented to keep them different (as the format does not allow for two-level bulleted lists);
   removed empy lines.
`os/os2`:	WIP, not modified
`sys/info`:
   removed "//+build ignore" line;
   converted tab-indented initial description into regular left-margin comment;
   moved uncommented sample code within the doc comment as an "Example:";
   moved simple- and double-tabbed separate comments with sample Windows and macOS outputs within the doc comment as bulleted headlines with preformatted output listings;
   removed now empty comments and blank lines after the package line.
`text/i18n`:
   removed "//+build ignore" line;
   moved the pacakge line at the end;
   de-indented the tab-indented introductory narrative;
   moved sample code comments into the doc comment as tab-indented code with a proper "Example:" heading;
   removed "```" MD attempts at code formatting.
`text/table`:
   unindented the comment lines of a descriptive kind;
   headlines of major subdivisions are marked as bold;
   kept code samples as tab-indented preformatted text (as there are several of them, the standard "Example:" and "Output:" headings cannot be used) removing the "```" MD attempts at code formatting;
   removed in-between blank lines.
2024-04-14 17:18:08 +02:00
Laytan Laats
3a0df80066 correct newly found vets 2024-04-03 00:52:58 +02:00
Laytan Laats
b7fd51a251 add MacOS 14.4.1 to sys/info and odin report 2024-03-28 19:39:18 +01:00
Laytan Laats
d0b3b18e26 update macOS releases for core:sys/info and odin report 2024-03-20 00:14:01 +01:00
gingerBill
3e7e779abf Replace core:* to base:* where appropriate 2024-01-28 22:18:51 +00:00
Jon Lipstate
880a18f124 fix shift direction 2024-01-12 22:28:38 -08:00
Jeroen van Rijn
2990747cf8 Reindent and align and f ix Ventura kernel+version swap. 2024-01-10 18:26:14 +01:00
Platin21
62c30795e6 Fixed indentation 2024-01-10 17:27:31 +01:00
Platin21
120ef168bf Added macOS versions for a lot of revisions 2024-01-10 16:42:25 +01:00
flysand7
4d65b1ab9c Implement new sys/unix package 2023-10-27 10:51:21 +11:00
Yawning Angel
def4fdc3f3 core/sys/info: Fix the CPUID check
This needs to test that the n-th bit is set.
2023-05-16 23:52:15 +09:00
Yawning Angel
adb4692ce8 core/sys/info: Workaround extremely rare XGETBV issues
Someone ran into this on Discord, so adopt the same workaround that
chrome did, by checking both OSXSAVE and XSAVE before calling XGETBV.

The old way of detecting AVX is correct per Intel, but such is life.
2023-05-16 22:56:16 +09:00
gingerBill
a262c0bbf3 Separate out the read_reg into three non-parapoly procedures 2023-03-07 16:25:46 +00:00
gingerBill
986cba584e Add runtime.DEFAULT_TEMP_ALLOCATOR_TEMP_GUARD where appropriate 2023-02-10 16:23:33 +00:00
gingerBill
b743f56fb9 Fix +build ignore 2022-11-04 11:39:54 +00:00
Ricardo Silva
1c9aad4d7b Update Darwin release map 2022-10-03 14:49:35 +01:00
Jeroen van Rijn
b6ed117726 [sys/info] Indentation nitpick. 2022-09-05 19:18:18 +02:00
Jeroen van Rijn
4b23decb08 Silence vet some more. 2022-09-05 19:04:18 +02:00
Jeroen van Rijn
1ca641f718 [sys/info] Add doc.odin with explanation. 2022-09-05 18:39:57 +02:00
Jeroen van Rijn
426f02906b [sys/info] Add OpenBSD detection support. 2022-09-04 20:37:38 +02:00
Jeroen van Rijn
2f6347b924 [sys/info] Add detection for Tiger, Leopard, Snow Leopard, Lion, Mountain Lion, Mavericks, Yosemite 2022-09-03 20:49:19 +02:00
Jeroen van Rijn
3f3f4fafff [sys/info] Move FreeBSD sysctl to sys/unix. 2022-09-03 16:53:03 +02:00
Jeroen van Rijn
4367ae4acf Merge branch 'sysinfo' of github.com:Kelimion/Odin into sysinfo 2022-09-03 16:30:44 +02:00
Jeroen van Rijn
4eafb0ce7f [sys/info] Move macOS sysctl to sys/unix. 2022-09-03 16:30:31 +02:00
Jeroen van Rijn
7a4891b6b9 [sys/info] Grab FreeBSD kernel info using sysctl. 2022-09-03 15:26:28 +02:00
Jeroen van Rijn
0171c276f0 [sys/info] Support FreeBSD 13 2022-09-03 02:33:36 +02:00
Jeroen van Rijn
0743dd195d [sys/info] Add detection for El Capitan, Sierra, High Sierra, Mojave 2022-09-02 22:46:24 +02:00
Jeroen van Rijn
d1a204a784 [sys/info] Add detection for Catalina, Big Sur, Monterey. 2022-09-02 21:15:34 +02:00
Jeroen van Rijn
1637de3ebb [sys/info] Parse xnu kernel version 2022-09-02 04:11:02 +02:00
Jeroen van Rijn
45691a4622 [sys/info] Add sysctl MIBs for MacOS. 2022-09-02 02:14:48 +02:00
Jeroen van Rijn
9e47c72b98 [sys/info] Better sysctl wrapper 2022-09-02 01:45:04 +02:00
Jeroen van Rijn
f5d13dc568 [sys/info] Add MacOS memory size 2022-09-02 01:26:58 +02:00
Jeroen van Rijn
0f3cebd2b7 [sys/info] Retrieve GPU info on Windows. 2022-09-01 16:05:49 +02:00
Jeroen van Rijn
7479ac48e8 [sys/info] Parse kernel/distro info. 2022-09-01 02:06:05 +02:00
Jeroen van Rijn
d5f94d73ad [sys/info] Initial version. 2022-09-01 00:43:47 +02:00