github.com/MerlinKodo/gvisor@v0.0.0-20231110090155-957f62ecf90e/pkg/waiter/waiter_state_autogen.go (about) 1 // automatically generated by stateify. 2 3 package waiter 4 5 import ( 6 "github.com/MerlinKodo/gvisor/pkg/state" 7 ) 8 9 func (e *Entry) StateTypeName() string { 10 return "pkg/waiter.Entry" 11 } 12 13 func (e *Entry) StateFields() []string { 14 return []string{ 15 "waiterEntry", 16 "eventListener", 17 "mask", 18 } 19 } 20 21 func (e *Entry) beforeSave() {} 22 23 // +checklocksignore 24 func (e *Entry) StateSave(stateSinkObject state.Sink) { 25 e.beforeSave() 26 stateSinkObject.Save(0, &e.waiterEntry) 27 stateSinkObject.Save(1, &e.eventListener) 28 stateSinkObject.Save(2, &e.mask) 29 } 30 31 func (e *Entry) afterLoad() {} 32 33 // +checklocksignore 34 func (e *Entry) StateLoad(stateSourceObject state.Source) { 35 stateSourceObject.Load(0, &e.waiterEntry) 36 stateSourceObject.Load(1, &e.eventListener) 37 stateSourceObject.Load(2, &e.mask) 38 } 39 40 func (q *Queue) StateTypeName() string { 41 return "pkg/waiter.Queue" 42 } 43 44 func (q *Queue) StateFields() []string { 45 return []string{ 46 "list", 47 } 48 } 49 50 func (q *Queue) beforeSave() {} 51 52 // +checklocksignore 53 func (q *Queue) StateSave(stateSinkObject state.Sink) { 54 q.beforeSave() 55 stateSinkObject.Save(0, &q.list) 56 } 57 58 func (q *Queue) afterLoad() {} 59 60 // +checklocksignore 61 func (q *Queue) StateLoad(stateSourceObject state.Source) { 62 stateSourceObject.Load(0, &q.list) 63 } 64 65 func (l *waiterList) StateTypeName() string { 66 return "pkg/waiter.waiterList" 67 } 68 69 func (l *waiterList) StateFields() []string { 70 return []string{ 71 "head", 72 "tail", 73 } 74 } 75 76 func (l *waiterList) beforeSave() {} 77 78 // +checklocksignore 79 func (l *waiterList) StateSave(stateSinkObject state.Sink) { 80 l.beforeSave() 81 stateSinkObject.Save(0, &l.head) 82 stateSinkObject.Save(1, &l.tail) 83 } 84 85 func (l *waiterList) afterLoad() {} 86 87 // +checklocksignore 88 func (l *waiterList) StateLoad(stateSourceObject state.Source) { 89 stateSourceObject.Load(0, &l.head) 90 stateSourceObject.Load(1, &l.tail) 91 } 92 93 func (e *waiterEntry) StateTypeName() string { 94 return "pkg/waiter.waiterEntry" 95 } 96 97 func (e *waiterEntry) StateFields() []string { 98 return []string{ 99 "next", 100 "prev", 101 } 102 } 103 104 func (e *waiterEntry) beforeSave() {} 105 106 // +checklocksignore 107 func (e *waiterEntry) StateSave(stateSinkObject state.Sink) { 108 e.beforeSave() 109 stateSinkObject.Save(0, &e.next) 110 stateSinkObject.Save(1, &e.prev) 111 } 112 113 func (e *waiterEntry) afterLoad() {} 114 115 // +checklocksignore 116 func (e *waiterEntry) StateLoad(stateSourceObject state.Source) { 117 stateSourceObject.Load(0, &e.next) 118 stateSourceObject.Load(1, &e.prev) 119 } 120 121 func init() { 122 state.Register((*Entry)(nil)) 123 state.Register((*Queue)(nil)) 124 state.Register((*waiterList)(nil)) 125 state.Register((*waiterEntry)(nil)) 126 }