git-svn-id: https://spexeah.com:8443/svn/Asuro@465 6dbc8c32-bb84-406f-8558-d1cf31a0ab0c
This commit is contained in:
parent
9976400832
commit
50fcfb8e22
BIN
bin/kernel.bin
BIN
bin/kernel.bin
Binary file not shown.
Binary file not shown.
BIN
lib/kernel.ppu
BIN
lib/kernel.ppu
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
lib/libpsystem.a
BIN
lib/libpsystem.a
Binary file not shown.
BIN
lib/lists.ppu
BIN
lib/lists.ppu
Binary file not shown.
@ -29,6 +29,7 @@ function LL_Delete(LinkedList : PLinkedListBase; idx : uint32) : boolean;
|
||||
function LL_Size(LinkedList : PLinkedListBase) : uint32;
|
||||
function LL_Insert(LinkedList : PLinkedListBase; idx : uint32) : Void;
|
||||
function LL_Get(LinkedList : PLinkedListBase; idx : uint32) : Void;
|
||||
procedure LL_Free(LinkedList : PLinkedListBase);
|
||||
procedure LL_TEST();
|
||||
|
||||
implementation
|
||||
@ -166,6 +167,14 @@ begin
|
||||
LL_Get:= Base^.Data;
|
||||
end;
|
||||
|
||||
procedure LL_Free(LinkedList : PLinkedListBase);
|
||||
begin
|
||||
while LL_Size(LinkedList) > 0 do begin
|
||||
LL_Delete(LinkedList, 0);
|
||||
end;
|
||||
kfree(void(LinkedList));
|
||||
end;
|
||||
|
||||
procedure LL_Test();
|
||||
var
|
||||
i : uint32;
|
||||
@ -211,6 +220,8 @@ begin
|
||||
for i:=0 to LL_Size(LList)-1 do begin
|
||||
console.writestringln(PChar(LL_Get(LList, i)));
|
||||
end;
|
||||
|
||||
LL_Free(LList);
|
||||
end;
|
||||
|
||||
end.
|
Loading…
x
Reference in New Issue
Block a user