blob: 76a39563d167f7ea66a72c1df54a718ed75d7ca3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
%ifndef LINKED_LIST_INC
%define LINKED_LIST_INC
%ifndef ALLOC_INC
%include "alloc.inc"
%endif
struc LinkedListNode
ll_next: resq 1
ll_value: resq 1
endstruc
struc DoublyLinkedListNode
dll_next: resq 1
dll_prev: resq 1
dll_value: resq 1
endstruc
%macro alloc_lln 0
alloc LinkedListNode_size
%endmacro
%macro alloc_dlln 0
alloc DoublyLinkedListNode_size
%endmacro
%macro free_lln 0-1 rax
free %1, LinkedListNode_size
%endmacro
%macro free_dlln 0-1 rax
free %1, DoublyLinkedListNode_size
%endmacro
%endif
|