Skip to contentSkip to conversation

fix native ppd cleanup

PATCH In review Jan Kiszka 2 participants 2 messages Apr 7, 2007

lore
Share & tools
lore

Jan Kiszka

author
#0 lore raw

PATCH 1/1 fix native ppd cleanup

Not beautiful, but required.

For a bean-counting approach, we could also make xeno_resource_holder elements conditional.

ksrc/skins/native/syscall.c +18 -0
Index: xenomai/ksrc/skins/native/syscall.c
===================================================================
@@ -3818,15 +3818,33 @@ static void *__shadow_eventcb(int event,
 	case XNSHADOW_CLIENT_DETACH:
 
 		rh = ppd2rholder((xnshadow_ppd_t *) data);
+#ifdef CONFIG_XENO_OPT_NATIVE_ALARM
 		__native_alarm_flush_rq(&rh->alarmq);
+#endif
+#ifdef CONFIG_XENO_OPT_NATIVE_COND
 		__native_cond_flush_rq(&rh->condq);
+#endif
+#ifdef CONFIG_XENO_OPT_NATIVE_EVENT
 		__native_event_flush_rq(&rh->eventq);
+#endif
+#ifdef CONFIG_XENO_OPT_NATIVE_HEAP
 		__native_heap_flush_rq(&rh->heapq);
+#endif
+#ifdef CONFIG_XENO_OPT_NATIVE_INTR
 		__native_intr_flush_rq(&rh->intrq);
+#endif
+#ifdef CONFIG_XENO_OPT_NATIVE_MUTEX
 		__native_mutex_flush_rq(&rh->mutexq);
+#endif
+#ifdef CONFIG_XENO_OPT_NATIVE_PIPE
 		__native_pipe_flush_rq(&rh->pipeq);
+#endif
+#ifdef CONFIG_XENO_OPT_NATIVE_QUEUE
 		__native_queue_flush_rq(&rh->queueq);
+#endif
+#ifdef CONFIG_XENO_OPT_NATIVE_SEM
 		__native_sem_flush_rq(&rh->semq);
+#endif
 
 		xnarch_sysfree(rh, sizeof(*rh));
 
#1 lore raw
Quoted 2 lines · Jan Kiszka

Not beautiful, but required.

Thanks. r2363 uses a slightly different approach in order to reduce the #ifdef noise in the same move.

Quoted 2 lines

For a bean-counting approach, we could also make xeno_resource_holder elements conditional.

Signature · 1 line
Philippe.