replace nob with ms' build, move disk creation to build.bat, major comment cleanup, remove old and stupid tests, overhaul interrupt management with per-CPU vector allocation, affinity migration and safe teardown, add proper IOAPIC routing and PCI MSI/MSI-X/INTx support, migrate drivers to the new interrupt API, integrate ACPICA with a proper OS services layer, move ACPI firmware events, power button handling and S5 shutdown into acpi.sys, add parallel driver startup and atomic publication, replace PnP arrays with dynamic lists, redesign service startup again to be asynchronous, add delayed startup mode for services, allow omitting keys in services.ini, fix acpi ec deferred work handling, fix kernel threads having garbage exit code.
This commit is contained in:
1 parent
d36f19509c
commit
36eef8f58d
696 files changed
+147281
-7530
No files matched your search
@@ -4,7 +4,6 @@
|
||||
#include <stddef.h>
|
||||
#include <intrin.h>
|
||||
|
||||
// Implements the strcpy operation.
|
||||
char* strcpy(char* dest, const char* src) {
|
||||
char* d = dest;
|
||||
while (*src) *d++ = *src++;
|
||||
@@ -12,7 +11,6 @@ char* strcpy(char* dest, const char* src) {
|
||||
return dest;
|
||||
}
|
||||
|
||||
// Implements the strncpy operation.
|
||||
char* strncpy(char* dest, const char* src, size_t n) {
|
||||
size_t i;
|
||||
for (i = 0; i < n && src[i]; i++) dest[i] = src[i];
|
||||
@@ -45,7 +43,6 @@ char* strstr(const char* haystack, const char* needle) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// Implements the strcat operation.
|
||||
char* strcat(char* dest, const char* src) {
|
||||
char* ptr = dest;
|
||||
while (*ptr != '\0') {
|
||||
@@ -60,7 +57,6 @@ char* strcat(char* dest, const char* src) {
|
||||
return dest;
|
||||
}
|
||||
|
||||
// Implements the strncat operation.
|
||||
char* strncat(char* dest, const char* src, size_t n) {
|
||||
char* ptr = dest;
|
||||
while (*ptr != '\0') {
|
||||
@@ -76,13 +72,11 @@ char* strncat(char* dest, const char* src, size_t n) {
|
||||
return dest;
|
||||
}
|
||||
|
||||
// Implements the strcmp operation.
|
||||
int strcmp(const char* s1, const char* s2) {
|
||||
while (*s1 && *s1 == *s2) s1++, s2++;
|
||||
return (unsigned char)*s1 - (unsigned char)*s2;
|
||||
}
|
||||
|
||||
// Implements the strncmp operation.
|
||||
int strncmp(const char* s1, const char* s2, size_t n) {
|
||||
while (n && *s1 && (*s1 == *s2)) {
|
||||
s1++;
|
||||
@@ -92,7 +86,6 @@ int strncmp(const char* s1, const char* s2, size_t n) {
|
||||
return n == 0 ? 0 : *(unsigned char*)s1 - *(unsigned char*)s2;
|
||||
}
|
||||
|
||||
// Implements the stricmp operation.
|
||||
int _stricmp(const char* s1, const char* s2) {
|
||||
// ASCII case folding works here because bit 0x20 distinguishes 'A' from 'a'.
|
||||
while (*s1 && ((*s1 | 0x20) == (*s2 | 0x20))) {
|
||||
@@ -101,14 +94,12 @@ int _stricmp(const char* s1, const char* s2) {
|
||||
return (unsigned char)(*s1 | 0x20) - (unsigned char)(*s2 | 0x20);
|
||||
}
|
||||
|
||||
// Implements the strlen operation.
|
||||
size_t strlen(const char* s) {
|
||||
size_t n = 0;
|
||||
while (*s++) n++;
|
||||
return n;
|
||||
}
|
||||
|
||||
// Implements the strnlen operation.
|
||||
size_t strnlen(const char* s, size_t maxlen) {
|
||||
size_t len;
|
||||
for (len = 0; len < maxlen; len++) {
|
||||
@@ -119,7 +110,6 @@ size_t strnlen(const char* s, size_t maxlen) {
|
||||
return len;
|
||||
}
|
||||
|
||||
// Implements the strchr operation.
|
||||
char* strchr(const char* s, int c) {
|
||||
while (*s) {
|
||||
if (*s == (char)c) return (char*)s;
|
||||
@@ -128,7 +118,6 @@ char* strchr(const char* s, int c) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// Implements the strrchr operation.
|
||||
char* strrchr(const char* s, int c) {
|
||||
char ch = (char)c;
|
||||
const char* last = NULL;
|
||||
@@ -150,7 +139,6 @@ void *memchr(const void *s, int c, size_t n) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// Implements the memset operation.
|
||||
void* memset(void* dest, int c, size_t n) {
|
||||
unsigned char* d = (unsigned char*)dest;
|
||||
size_t qwords = n / 8;
|
||||
@@ -172,7 +160,6 @@ void* memset(void* dest, int c, size_t n) {
|
||||
return dest;
|
||||
}
|
||||
|
||||
// Implements the memcpy operation.
|
||||
void* memcpy(void* dest, const void* src, size_t n) {
|
||||
unsigned char* d = (unsigned char*)dest;
|
||||
const unsigned char* s = (const unsigned char*)src;
|
||||
@@ -192,7 +179,6 @@ void* memcpy(void* dest, const void* src, size_t n) {
|
||||
return dest;
|
||||
}
|
||||
|
||||
// Implements the memmove operation.
|
||||
void* memmove(void* dest, const void* src, size_t n) {
|
||||
unsigned char* d = (unsigned char*)dest;
|
||||
const unsigned char* s = (const unsigned char*)src;
|
||||
@@ -233,7 +219,6 @@ void* memmove(void* dest, const void* src, size_t n) {
|
||||
return dest;
|
||||
}
|
||||
|
||||
// Implements the memcmp operation.
|
||||
int memcmp(const void* s1, const void* s2, size_t n) {
|
||||
const unsigned __int64* a64 = (const unsigned __int64*)s1;
|
||||
const unsigned __int64* b64 = (const unsigned __int64*)s2;
|
||||
|
||||
Reference in new issue
Block a user