• Home
  • Raw
  • Download

Lines Matching refs:p

63 	struct atexit *p = __atexit;  in __cxa_atexit()  local
68 if (pgsize < (int)sizeof(*p)) in __cxa_atexit()
71 p = __atexit; in __cxa_atexit()
72 if (p != NULL) { in __cxa_atexit()
73 if (p->ind + 1 >= p->max) in __cxa_atexit()
74 p = NULL; in __cxa_atexit()
75 else if (mprotect(p, pgsize, PROT_READ | PROT_WRITE)) in __cxa_atexit()
78 if (p == NULL) { in __cxa_atexit()
79 p = mmap(NULL, pgsize, PROT_READ | PROT_WRITE, in __cxa_atexit()
81 if (p == MAP_FAILED) in __cxa_atexit()
84 memset(&p->fns[0], 0, sizeof(p->fns[0])); in __cxa_atexit()
85 p->ind = 1; in __cxa_atexit()
87 p->ind = 0; in __cxa_atexit()
88 p->max = (pgsize - ((char *)&p->fns[0] - (char *)p)) / in __cxa_atexit()
89 sizeof(p->fns[0]); in __cxa_atexit()
90 p->next = __atexit; in __cxa_atexit()
91 __atexit = p; in __cxa_atexit()
95 fnp = &p->fns[p->ind++]; in __cxa_atexit()
99 if (mprotect(p, pgsize, PROT_READ)) in __cxa_atexit()
126 struct atexit *p, *q; in __cxa_finalize() local
136 for (p = __atexit; p != NULL; p = p->next) { in __cxa_finalize()
137 for (n = p->ind; --n >= 0;) { in __cxa_finalize()
138 if (p->fns[n].fn_ptr.cxa_func == NULL) in __cxa_finalize()
140 if (dso != NULL && dso != p->fns[n].fn_dso) in __cxa_finalize()
147 fn = p->fns[n]; in __cxa_finalize()
148 if (mprotect(p, pgsize, PROT_READ | PROT_WRITE) == 0) { in __cxa_finalize()
149 p->fns[n].fn_ptr.cxa_func = NULL; in __cxa_finalize()
150 mprotect(p, pgsize, PROT_READ); in __cxa_finalize()
174 for (p = __atexit; p != NULL; ) { in __cxa_finalize()
175 q = p; in __cxa_finalize()
176 p = p->next; in __cxa_finalize()
189 struct atexit *p; in __atexit_register_cleanup() local
192 if (pgsize < (int)sizeof(*p)) in __atexit_register_cleanup()
195 p = __atexit; in __atexit_register_cleanup()
196 while (p != NULL && p->next != NULL) in __atexit_register_cleanup()
197 p = p->next; in __atexit_register_cleanup()
198 if (p == NULL) { in __atexit_register_cleanup()
199 p = mmap(NULL, pgsize, PROT_READ | PROT_WRITE, in __atexit_register_cleanup()
201 if (p == MAP_FAILED) in __atexit_register_cleanup()
203 p->ind = 1; in __atexit_register_cleanup()
204 p->max = (pgsize - ((char *)&p->fns[0] - (char *)p)) / in __atexit_register_cleanup()
205 sizeof(p->fns[0]); in __atexit_register_cleanup()
206 p->next = NULL; in __atexit_register_cleanup()
207 __atexit = p; in __atexit_register_cleanup()
211 if (mprotect(p, pgsize, PROT_READ | PROT_WRITE)) in __atexit_register_cleanup()
214 p->fns[0].fn_ptr.std_func = func; in __atexit_register_cleanup()
215 p->fns[0].fn_arg = NULL; in __atexit_register_cleanup()
216 p->fns[0].fn_dso = NULL; in __atexit_register_cleanup()
217 mprotect(p, pgsize, PROT_READ); in __atexit_register_cleanup()