Lines Matching refs:node
167 #define PRIVATE_DATA(node) \
168 (&(((EventHandlerRestricted_HandlerNode*)(void*)(node))->private_ehpd))
170 #define NEXT(node) (PRIVATE_DATA(node)->private_next)
171 #define PREV(node) (PRIVATE_DATA(node)->private_prev)
172 #define CHAIN(node) (PRIVATE_DATA(node)->private_chain)
173 #define HANDLER_FUNCTION(node) (PRIVATE_DATA(node)->private_handlerFunction)
176 static jvmtiError freeHandler(HandlerNode *node);
190 insert(HandlerChain *chain, HandlerNode *node)
193 NEXT(node) = oldHead;
194 PREV(node) = NULL;
195 CHAIN(node) = chain;
197 PREV(oldHead) = node;
199 chain->first = node;
205 HandlerNode *node = chain->first;
206 while (node != NULL) {
207 if (node->handlerID == handlerID) {
208 return node;
210 node = NEXT(node);
225 deinsert(HandlerNode *node)
227 HandlerChain *chain = CHAIN(node);
232 if (chain->first == node) {
233 chain->first = NEXT(node);
235 if (NEXT(node) != NULL) {
236 PREV(NEXT(node)) = PREV(node);
238 if (PREV(node) != NULL) {
239 NEXT(PREV(node)) = NEXT(node);
241 CHAIN(node) = NULL;
249 HandlerNode *node;
253 node = chain->first;
260 while (node != NULL) {
261 if (((func)(env, node, arg))) {
264 node = NEXT(node);
470 HandlerNode *node;
489 node = getHandlerChain(EI_GC_FINISH)->first;
490 while (node != NULL) {
492 HandlerNode *next = NEXT(node);
496 node,
505 eventHelper_recordClassUnload(node->handlerID,
510 /* We can safely free the node now that we are done
513 (void)freeHandler(node);
515 node = next;
640 HandlerNode *node;
648 node = getHandlerChain(evinfo->ei)->first;
651 while (node != NULL) {
653 HandlerNode *next = NEXT(node);
657 evinfo, node,
661 func = HANDLER_FUNCTION(node);
665 (*func)(env, evinfo, node, eventBag);
668 /* We can safely free the node now that we are done
671 (void)freeHandler(node);
673 node = next;
1307 freeHandler(HandlerNode *node) {
1310 /* deinsert the handler node before disableEvents() to make
1314 if (node != NULL && (!node->permanent)) {
1315 deinsert(node);
1316 error = eventFilterRestricted_deinstall(node);
1317 jvmtiDeallocate(node);
1330 HandlerNode *node;
1334 node = chain->first;
1335 while ( node != NULL ) {
1339 next = NEXT(node);
1340 singleError = freeHandler(node);
1344 node = next;
1353 eventHandler_free(HandlerNode *node)
1359 error = freeHandler(node);
1374 HandlerNode *node;
1377 node = getHandlerChain(ei)->first;
1378 while (node != NULL) {
1379 HandlerNode *next = NEXT(node); /* allows node removal */
1380 if (node->handlerID != 0) { /* don't free internal handlers */
1381 error = freeHandler(node);
1386 node = next;
1398 HandlerNode *node;
1402 node = getHandlerChain(EI_BREAKPOINT)->first;
1403 while (node != NULL) {
1404 HandlerNode *next = NEXT(node); /* allows node removal */
1406 node)) {
1407 (void)freeHandler(node);
1409 node = next;
1418 HandlerNode *node;
1421 node = find(ei, handlerID);
1422 if (node != NULL) {
1423 error = freeHandler(node);
1591 HandlerNode *node = eventFilterRestricted_alloc(filterCount);
1593 if (node != NULL) {
1594 node->ei = ei;
1595 node->suspendPolicy = suspendPolicy;
1596 node->permanent = JNI_FALSE;
1599 return node;
1615 installHandler(HandlerNode *node,
1627 HANDLER_FUNCTION(node) = func;
1629 node->handlerID = external? ++requestIdCounter : 0;
1630 error = eventFilterRestricted_install(node);
1632 insert(getHandlerChain(node->ei), node);
1647 HandlerNode *node;
1652 node = eventHandler_alloc(
1655 if (node == NULL) {
1659 node->permanent = permanent;
1662 error = eventFilter_setThreadOnlyFilter(node, index++, thread);
1666 error = eventFilter_setLocationOnlyFilter(node, index++, clazz,
1670 * Create the new handler node
1672 error = installHandler(node, func, JNI_FALSE);
1675 (void)eventHandler_free(node);
1676 node = NULL;
1678 return node;
1709 eventHandler_installExternal(HandlerNode *node)
1711 return installHandler(node,
1712 standardHandlers_defaultHandler(node->ei),