This commit is contained in:
nakst 2022-01-05 14:40:04 +00:00
parent 8c0ca3e8fc
commit d312c1d475
6 changed files with 6 additions and 13 deletions

View File

@ -191,9 +191,6 @@ extern "C" {
#include <shared/partitions.cpp>
#include <shared/heap.cpp>
#define ARRAY_IMPLEMENTATION_ONLY
#include <shared/array.cpp>
#define SHARED_COMMON_WANT_ALL
#include <shared/strings.cpp>
#include <shared/common.cpp>

View File

@ -60,6 +60,7 @@ extern EsHeap heapFixed;
void *EsHeapAllocate(size_t size, bool zeroMemory, EsHeap *kernelHeap);
void EsHeapFree(void *address, size_t expectedSize, EsHeap *kernelHeap);
void *EsHeapReallocate(void *oldAddress, size_t newAllocationSize, bool zeroNewSpace, EsHeap *_heap);
// ---------------------------------------------------------------------------------------------------------------
// Debug output.
@ -108,9 +109,11 @@ void KUnregisterMSI(uintptr_t tag);
#ifndef K_IN_CORE_KERNEL
#define SHARED_DEFINITIONS_ONLY
#define ARRAY_DEFINITIONS_ONLY
#endif
#include <shared/unicode.cpp>
#include <shared/linked_list.cpp>
#include <shared/array.cpp>
uint32_t CalculateCRC32(const void *_buffer, size_t length, uint32_t carry);
uint64_t CalculateCRC64(const void *_buffer, size_t length, uint64_t carry);
@ -387,10 +390,6 @@ void *MMMapShared(MMSpace *space, MMSharedRegion *sharedRegion, uintptr_t offset
// Panics on failure.
void MMCheckUnusable(uintptr_t physicalStart, size_t bytes);
#define ARRAY_DEFINITIONS_ONLY
#include <shared/array.cpp>
#undef ARRAY_DEFINITIONS_ONLY
typedef SimpleList MMObjectCacheItem;
struct MMObjectCache {

View File

@ -22,7 +22,7 @@ struct ConstantBuffer {
struct Pipe {
#define PIPE_READER (1)
#define PIPE_WRITER (2)
#define PIPE_BUFFER_SIZE (K_PAGE_SIZE)
#define PIPE_BUFFER_SIZE (256)
#define PIPE_CLOSED (0)
volatile char buffer[PIPE_BUFFER_SIZE];

View File

@ -2,8 +2,6 @@
// It is released under the terms of the MIT license -- see LICENSE.md.
// Written by: nakst.
#ifndef ARRAY_IMPLEMENTATION_ONLY
struct _ArrayHeader {
size_t length, allocated;
};
@ -88,8 +86,6 @@ struct Array {
}
};
#endif
#ifndef ARRAY_DEFINITIONS_ONLY
bool _ArrayMaybeInitialise(void **array, size_t itemSize, EsHeap *heap) {

View File

@ -4,4 +4,4 @@ mkdir -p bin/include_x11
cp root/Applications/POSIX/include/essence.h bin/include_x11
cp root/Essence/Desktop.esx bin/bundle.dat
ld -r -b binary -o bin/Object\ Files/bundle.o bin/bundle.dat
g++ -o bin/hello_x11 util/x11/platform.cpp $1 bin/Object\ Files/bundle.o -lfreetype -lharfbuzz -lX11 -pthread -g -fno-exceptions -Ibin/include_x11 -I. -I/usr/include/freetype2 -DNO_API_TABLE -DUSE_PLATFORM_HEAP -DUSE_FREETYPE_AND_HARFBUZZ -DUSE_STB_SPRINTF -D_start=_StartApplication -D_init=EsHeapValidate -DES_FORWARD -Wall -Wextra -Wno-empty-body -Wno-deprecated-declarations -Wno-unknown-pragmas -Wno-missing-field-initializers -Wno-unused-parameter -Wno-unused-variable -Wno-unused-function -fsanitize=address
g++ -o bin/hello_x11 util/x11/platform.cpp $1 bin/Object\ Files/bundle.o -lfreetype -lharfbuzz -lX11 -pthread -g -fno-exceptions -Ibin/include_x11 -I. -I/usr/include/freetype2 -DNO_API_TABLE -DUSE_PLATFORM_HEAP -DUSE_FREETYPE_AND_HARFBUZZ -DUSE_STB_SPRINTF -D_start=_StartApplication -D_init=EsHeapValidate -DES_FORWARD -DARRAY_DEFINITIONS_ONLY -Wall -Wextra -Wno-empty-body -Wno-deprecated-declarations -Wno-unknown-pragmas -Wno-missing-field-initializers -Wno-unused-parameter -Wno-unused-variable -Wno-unused-function -fsanitize=address

View File

@ -2,6 +2,7 @@
#undef ES_FORWARD
#define Font _Font
#define _start _StartDesktop
#undef ARRAY_DEFINITIONS_ONLY
#include <desktop/api.cpp>
#undef _start
#undef Font