This class implements an unbounded queue by buffering all items that are put into it.
template<typename T, typename Allocator>
struct async::queue {
void put(T object);
/* unspecified async::sender */ async_get(); // [1]
/* This file is part of the Managarm operating system. | |
* Copyright (C) 2007, 2008, 2009 Alexander van der Grinten | |
* | |
* This program is free software: you can redistribute it and/or modify | |
* it under the terms of the GNU General Public License as published by | |
* the Free Software Foundation, either version 3 of the License, or | |
* (at your option) any later version. | |
* | |
* This program is distributed in the hope that it will be useful, |
#include <assert.h> | |
#include <stddef.h> | |
#include <stdint.h> | |
#include <time.h> | |
#include <chrono> | |
#include <iostream> | |
// ---------------------------------------------------------------------------- | |
// The new buddy allocator. |
diff --git a/abis/linux/x86_64/abi.h b/abis/linux/x86_64/abi.h | |
new file mode 100644 | |
index 0000000..2d970d9 | |
--- /dev/null | |
+++ b/abis/linux/x86_64/abi.h | |
@@ -0,0 +1,27 @@ | |
+#ifndef _ABIBITS_ABI_H | |
+#define _ABIBITS_ABI_H | |
+ | |
+#define __MLIBC_LINUX_O_PATH 010000000 |
void processElfDso(const char *buffer) { | |
auto base = reinterpret_cast<char *>(KernelVirtualMemory::global().allocate(0x10000)); | |
// Check the EHDR file header. | |
Elf64_Ehdr ehdr; | |
memcpy(&ehdr, buffer, sizeof(Elf64_Ehdr)); | |
assert(ehdr.e_ident[0] == 0x7F | |
&& ehdr.e_ident[1] == 'E' | |
&& ehdr.e_ident[2] == 'L' | |
&& ehdr.e_ident[3] == 'F'); |
/* Default linker script, for normal executables */ | |
/* Copyright (C) 2014-2017 Free Software Foundation, Inc. | |
Copying and distribution of this script, with or without modification, | |
are permitted in any medium without royalty provided the copyright | |
notice and this notice are preserved. */ | |
OUTPUT_FORMAT("elf64-x86-64", "elf64-x86-64", | |
"elf64-x86-64") | |
OUTPUT_ARCH(i386:x86-64) | |
ENTRY(_start) | |
SEARCH_DIR("=/usr/local/lib/x86_64-linux-gnu"); SEARCH_DIR("=/lib/x86_64-linux-gnu"); SEARCH_DIR("=/usr/lib/x86_64-linux-gnu"); SEARCH_DIR("=/usr/local/lib64"); SEARCH_DIR("=/lib64"); SEARCH_DIR("=/usr/lib64"); SEARCH_DIR("=/usr/local/lib"); SEARCH_DIR("=/lib"); SEARCH_DIR("=/usr/lib"); SEARCH_DIR("=/usr/x86_64-linux-gnu/lib64"); SEARCH_DIR("=/usr/x86_64-linux-gnu/lib"); |