mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 02:07:36 +00:00
IPCCompiler: Remove hardcoded endpoint magic, attempt deux
This patch removes the IPC endpoint numbers that needed to be specified in the IPC files. Since the string hash is a (hopefully) collision free number that depends on the name of the endpoint, we now use that instead. :^) Additionally, endpoint magic is now treated as a u32, because endpoint numbers were never negative anyway. For cases where the endpoint number does have to be hardcoded (a current case is LookupServer because the endpoint number must be known in LibC), the syntax has been made more explicit to avoid confusing those unfamiliar. To hardcode the endpoint magic, the following syntax is now used: endpoint EndpointName [magic=1234]
This commit is contained in:
parent
64d05152f7
commit
62af6cd4f9
28 changed files with 62 additions and 37 deletions
|
@ -26,6 +26,11 @@ static in_addr_t* __gethostbyname_address_list_buffer[2];
|
|||
|
||||
static hostent __gethostbyaddr_buffer;
|
||||
static in_addr_t* __gethostbyaddr_address_list_buffer[2];
|
||||
// XXX: IPCCompiler depends on LibC. Because of this, it cannot be compiled
|
||||
// before LibC is. However, the lookup magic can only be obtained from the
|
||||
// endpoint itself if IPCCompiler has compiled the IPC file, so this creates
|
||||
// a chicken-and-egg situation. Because of this, the LookupServer endpoint magic
|
||||
// is hardcoded here.
|
||||
static constexpr i32 lookup_server_endpoint_magic = 9001;
|
||||
|
||||
// Get service entry buffers and file information for the getservent() family of functions.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue