Skip to content

Commit 4697b4b

Browse files
committed
update dependencies
1 parent a805e0d commit 4697b4b

File tree

13 files changed

+234
-247
lines changed

13 files changed

+234
-247
lines changed

.gitmodules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
path = dependencies/limine/limine
4747
url = https://codeberg.org/Limine/Limine
4848
shallow = true
49-
branch = v10.x-binary
49+
branch = v11.x-binary
5050
[submodule "dependencies/limine-protocol/limine-protocol"]
5151
path = dependencies/limine-protocol/limine-protocol
5252
url = https://codeberg.org/Limine/limine-protocol
Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
11
# Copyright (C) 2024-2025 ilobilo
22

33
set(DEMANGLER_INCLUDES "${CMAKE_CURRENT_LIST_DIR}/demangler/include" CACHE PATH "")
4-
set(DEMANGLER_SOURCES
5-
"${CMAKE_CURRENT_LIST_DIR}/demangler/source/ItaniumDemangle.cpp"
6-
"${CMAKE_CURRENT_LIST_DIR}/demangler/source/cxa_demangle.cpp"
7-
CACHE STRING ""
8-
)
4+
set(DEMANGLER_SOURCES "${CMAKE_CURRENT_LIST_DIR}/demangler/source/demangler.cpp" CACHE STRING "")

dependencies/demangler/demangler1

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Subproject commit 299f5153be537cfe6fee6d59617fd1f2e151f111

dependencies/frigg/frigg

Submodule limine-protocol updated from 12856cb to c5a7f59

dependencies/limine/limine

Submodule limine updated from 7a9013f to 56e7bf2

kernel/include/libc/ctype.h

Lines changed: 69 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,75 @@
66
extern "C" {
77
#endif
88

9-
int isalnum(int c);
10-
int isalpha(int c);
11-
int islower(int c);
12-
int isupper(int c);
13-
int isdigit(int c);
14-
int isxdigit(int c);
15-
int iscntrl(int c);
16-
int isgraph(int c);
17-
int isspace(int c);
18-
int isblank(int c);
19-
int isprint(int c);
20-
int ispunct(int c);
21-
int toupper(int c);
22-
int tolower(int c);
9+
inline int isalnum(int c)
10+
{
11+
return (c >= '0' && c <= '9') || (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z');
12+
}
13+
14+
inline int isalpha(int c)
15+
{
16+
return (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z');
17+
}
18+
19+
inline int islower(int c)
20+
{
21+
return (c >= 'a' && c <= 'z');
22+
}
23+
24+
inline int isupper(int c)
25+
{
26+
return (c >= 'A' && c <= 'Z');
27+
}
28+
29+
inline int isdigit(int c)
30+
{
31+
return (c >= '0' && c <= '9');
32+
}
33+
34+
inline int isxdigit(int c)
35+
{
36+
return (c >= '0' && c <= '9') || (c >= 'a' && c <= 'f') || (c >= 'A' && c <= 'F');
37+
}
38+
39+
inline int iscntrl(int c)
40+
{
41+
return (c >= 0x00 && c <= 0x1F) || (c == 0x7F);
42+
}
43+
44+
inline int isgraph(int c)
45+
{
46+
return (c >= '!' && c <= '~');
47+
}
48+
49+
inline int isspace(int c)
50+
{
51+
return (c == ' ') || (c == '\f') || (c == '\n') || (c == '\r') || (c == '\t') || (c == '\v');
52+
}
53+
54+
inline int isblank(int c)
55+
{
56+
return (c == ' ') || (c == '\t');
57+
}
58+
59+
inline int isprint(int c)
60+
{
61+
return (c >= '!' && c <= '~') || (c == ' ');
62+
}
63+
64+
inline int ispunct(int c)
65+
{
66+
return (c >= '!' && c <= '/') || (c >= ':' && c <= '@') || (c >= '[' && c <= '`') || (c >= '{' && c <= '~');
67+
}
68+
69+
inline int toupper(int c)
70+
{
71+
return (c >= 'a' && c <= 'z') ? c - 0x20 : c;
72+
}
73+
74+
inline int tolower(int c)
75+
{
76+
return (c >= 'A' && c <= 'Z') ? c + 0x20 : c;
77+
}
2378

2479
#ifdef __cplusplus
2580
} // extern "C"

kernel/source/arch/x86_64/system/cpu.cpp

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -128,37 +128,37 @@ namespace cpu
128128
constexpr std::uint32_t rfbm_low = rfbm & 0xFFFFFFFF;
129129
constexpr std::uint32_t rfbm_high = (rfbm >> 32) & 0xFFFFFFFF;
130130

131-
cpu_local(fpu, fpu_percpu);
132-
} // namespace
131+
void xsaveopt(std::byte *region)
132+
{
133+
asm volatile ("xsaveopt [%0]" :: "r"(region), "a"(rfbm_low), "d"(rfbm_high) : "memory");
134+
}
133135

134-
fpu &get_fpu()
135-
{
136-
return fpu_percpu.unsafe_get();
137-
}
136+
void xsave(std::byte *region)
137+
{
138+
asm volatile ("xsave [%0]" :: "r"(region), "a"(rfbm_low), "d"(rfbm_high) : "memory");
139+
}
138140

139-
void xsaveopt(std::byte *region)
140-
{
141-
asm volatile ("xsaveopt [%0]" :: "r"(region), "a"(rfbm_low), "d"(rfbm_high) : "memory");
142-
}
141+
void xrstor(std::byte *region)
142+
{
143+
asm volatile ("xrstor [%0]" :: "r"(region), "a"(rfbm_low), "d"(rfbm_high) : "memory");
144+
}
143145

144-
void xsave(std::byte *region)
145-
{
146-
asm volatile ("xsave [%0]" :: "r"(region), "a"(rfbm_low), "d"(rfbm_high) : "memory");
147-
}
146+
void fxsave(std::byte *region)
147+
{
148+
asm volatile ("fxsave [%0]" :: "r"(region) : "memory");
149+
}
148150

149-
void xrstor(std::byte *region)
150-
{
151-
asm volatile ("xrstor [%0]" :: "r"(region), "a"(rfbm_low), "d"(rfbm_high) : "memory");
152-
}
151+
void fxrstor(std::byte *region)
152+
{
153+
asm volatile ("fxrstor [%0]" :: "r"(region) : "memory");
154+
}
153155

154-
void fxsave(std::byte *region)
155-
{
156-
asm volatile ("fxsave [%0]" :: "r"(region) : "memory");
157-
}
156+
cpu_local(fpu, fpu_percpu);
157+
} // namespace
158158

159-
void fxrstor(std::byte *region)
159+
fpu &get_fpu()
160160
{
161-
asm volatile ("fxrstor [%0]" :: "r"(region) : "memory");
161+
return fpu_percpu.unsafe_get();
162162
}
163163

164164
void enable()

kernel/source/deps/uacpi.cpp

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -29,27 +29,27 @@ namespace uacpi
2929
const auto glocked = gpe.read_lock();
3030
return nlocked->empty() && glocked->empty();
3131
}
32-
} // namespace
3332

34-
void worker_caller(queue_type &queue, lib::semaphore &added)
35-
{
36-
while (true)
33+
void worker_caller(queue_type &queue, lib::semaphore &added)
3734
{
38-
added.wait();
39-
bool worked = false;
35+
while (true)
4036
{
41-
auto locked = queue.write_lock();
42-
while (!locked->empty())
37+
added.wait();
38+
bool worked = false;
4339
{
44-
auto [handler, handle] = locked->pop_front_element();
45-
handler(handle);
46-
worked = true;
40+
auto locked = queue.write_lock();
41+
while (!locked->empty())
42+
{
43+
auto [handler, handle] = locked->pop_front_element();
44+
handler(handle);
45+
worked = true;
46+
}
4747
}
48+
if (worked)
49+
completed.signal();
4850
}
49-
if (worked)
50-
completed.signal();
5151
}
52-
}
52+
} // namespace
5353

5454
lib::initgraph::task uacpi_task
5555
{

0 commit comments

Comments
 (0)