Build original Ada port core, V client, and x86-64 boot milestone

This commit is contained in:
Admin committed 2026-11-01 16:07:00 +08:00
1 parent 9af96aa1e1
commit fc2bee6f32
28 files changed
+865 -7

No files matched your search

+44
View File
@@ -0,0 +1,44 @@
with Agila_Ports;
package body Agila_ABI is
State : Agila_Ports.Manager;
function Create (Owner : Word) return Word is
Handle : Word;
Result : Agila_Ports.Status;
begin
Agila_Ports.Create (State, Owner, Handle, Result);
return Handle;
end Create;
function Allow_Sender (Handle, Owner, Sender : Word) return Code is
Result : Agila_Ports.Status;
begin
Agila_Ports.Allow_Sender (State, Handle, Owner, Sender, Result);
return Agila_Ports.Status'Pos (Result);
end Allow_Sender;
function Revoke_Sender (Handle, Owner, Sender : Word) return Code is
Result : Agila_Ports.Status;
begin
Agila_Ports.Revoke_Sender (State, Handle, Owner, Sender, Result);
return Agila_Ports.Status'Pos (Result);
end Revoke_Sender;
function Send (Handle, Caller, Value : Word) return Code is
Result : Agila_Ports.Status;
begin
Agila_Ports.Send (State, Handle, Caller, Value, Result);
return Agila_Ports.Status'Pos (Result);
end Send;
function Receive (Handle, Caller : Word; Value : access Word) return Code is
Item : Agila_Ports.Message;
Result : Agila_Ports.Status;
begin
if Value = null then return Agila_Ports.Status'Pos (Agila_Ports.Invalid_Argument); end if;
Agila_Ports.Receive (State, Handle, Caller, Item, Result);
Value.all := Item.Value;
return Agila_Ports.Status'Pos (Result);
end Receive;
function Close (Handle, Caller : Word) return Code is
Result : Agila_Ports.Status;
begin
Agila_Ports.Close (State, Handle, Caller, Result);
return Agila_Ports.Status'Pos (Result);
end Close;
end Agila_ABI;
+18
View File
@@ -0,0 +1,18 @@
with Interfaces;
with Interfaces.C;
package Agila_ABI is
subtype Word is Interfaces.Unsigned_32;
subtype Code is Interfaces.C.int;
function Create (Owner : Word) return Word
with Export, Convention => C, External_Name => "agila_port_create";
function Allow_Sender (Handle, Owner, Sender : Word) return Code
with Export, Convention => C, External_Name => "agila_port_allow_sender";
function Revoke_Sender (Handle, Owner, Sender : Word) return Code
with Export, Convention => C, External_Name => "agila_port_revoke_sender";
function Send (Handle, Caller, Value : Word) return Code
with Export, Convention => C, External_Name => "agila_port_send";
function Receive (Handle, Caller : Word; Value : access Word) return Code
with Export, Convention => C, External_Name => "agila_port_receive";
function Close (Handle, Caller : Word) return Code
with Export, Convention => C, External_Name => "agila_port_close";
end Agila_ABI;