osdir.com
mailing list archive

Subject: [Resent][PATCH] fix doxygen complaints - msg#00049

List: linux.real-time.xenomai.devel

Date: Prev Next Index Thread: Prev Next Index
Hi Philippe,

that one appears to have dropped under the table.

Gilles once remarked that the line breaks in a few prototypes for
doxygen comments used to confuse certain doxygen versions. I cannot
reproduce this issue, but I can change the breaks if preferred.

Jan
---
doc/doxygen/Doxyfile-common.in | 3 ++-
ksrc/arch/generic/hal.c | 32 ++++++++++++++++++--------------
ksrc/skins/posix/clock.c | 4 ++--
3 files changed, 22 insertions(+), 17 deletions(-)

Index: xenomai/ksrc/skins/posix/clock.c
===================================================================
--- xenomai.orig/ksrc/skins/posix/clock.c
+++ xenomai/ksrc/skins/posix/clock.c
@@ -139,10 +139,10 @@ int clock_gettime(clockid_t clock_id, st
*
* This allow setting the CLOCK_REALTIME clock.
*
- * @param clock_id, the id of the clock to be set, only CLOCK_REALTIME is
+ * @param clock_id the id of the clock to be set, only CLOCK_REALTIME is
* supported.
*
- * @param tp, the address of a struct timespec specifying the new date.
+ * @param tp the address of a struct timespec specifying the new date.
*
* @retval 0 on success;
* @retval -1 with @a errno set if:
Index: xenomai/ksrc/arch/generic/hal.c
===================================================================
--- xenomai.orig/ksrc/arch/generic/hal.c
+++ xenomai/ksrc/arch/generic/hal.c
@@ -173,7 +173,7 @@ int rthal_irq_request(unsigned irq,

/**
* @fn int rthal_irq_release(unsigned irq)
- *
+ *
* @brief Uninstall a real-time interrupt handler.
*
* Uninstalls an interrupt handler previously attached using the
@@ -208,7 +208,7 @@ int rthal_irq_release(unsigned irq)

/**
* @fn int rthal_irq_host_request(unsigned irq,rthal_irq_host_handler_t
handler,char *name,void *dev_id)
- *
+ *
* @brief Install a shared Linux interrupt handler.
*
* Installs a shared interrupt handler in the Linux domain for the
@@ -244,7 +244,7 @@ int rthal_irq_release(unsigned irq)

/**
* @fn int rthal_irq_host_release (unsigned irq,void *dev_id)
- *
+ *
* @brief Uninstall a shared Linux interrupt handler.
*
* Uninstalls a shared interrupt handler from the Linux domain for the
@@ -274,7 +274,7 @@ int rthal_irq_release(unsigned irq)

/**
* @fn int rthal_irq_host_pend (unsigned irq)
- *
+ *
* @brief Propagate an IRQ event to Linux.
*
* Causes the given IRQ to be propagated down to the Adeos pipeline to
@@ -304,13 +304,13 @@ int rthal_irq_host_pend(unsigned irq)

/**
* @fn int rthal_irq_affinity (unsigned irq,cpumask_t cpumask,cpumask_t
*oldmask)
- *
+ *
* @brief Set/Get processor affinity for external interrupt.
*
* On SMP systems, this service ensures that the given interrupt is
* preferably dispatched to the specified set of processors. The
* previous affinity mask is returned by this service.
- *
+ *
* @param irq The interrupt source whose processor affinity is
* affected by the operation. Only external interrupts can have their
* affinity changed/queried, thus virtual interrupt numbers allocated
@@ -320,7 +320,7 @@ int rthal_irq_host_pend(unsigned irq)
* representing the new affinity for this interrupt. A zero value
* cause this service to return the current affinity mask without
* changing it.
- *
+ *
* @param oldmask If non-NULL, a pointer to a memory area which will
* bve overwritten by the previous affinity mask used for this
* interrupt source, or a zeroed mask if an error occurred. This
@@ -365,7 +365,7 @@ int rthal_irq_affinity(unsigned irq, cpu

/**
* @fn int rthal_trap_catch (rthal_trap_handler_t handler)
- *
+ *
* @brief Installs a fault handler.
*
* The HAL attempts to invoke a fault handler whenever an uncontrolled
@@ -927,7 +927,7 @@ unsigned long long __rthal_generic_full_

/**
* @fn int rthal_irq_enable(unsigned irq)
- *
+ *
* @brief Enable an interrupt source.
*
* Enables an interrupt source at PIC level. Since Adeos masks and
@@ -958,7 +958,7 @@ unsigned long long __rthal_generic_full_

/**
* @fn int rthal_irq_disable(unsigned irq)
- *
+ *
* @brief Disable an interrupt source.
*
* Disables an interrupt source at PIC level. After this call has
@@ -983,8 +983,10 @@ unsigned long long __rthal_generic_full_
* - Any domain context.
*/

-/*!
- * \fn int rthal_timer_request(void (*tick_handler) (void), void
(*mode_emul)(int mode, void *tdev), int (*tick_emul)(unsigned long delay, void
*tdev), int cpu)
+/**
+ * \fn int rthal_timer_request(void (*tick_handler)(void),
+ * void (*mode_emul)(enum clock_event_mode mode, struct
ipipe_tick_device *tdev),
+ * int (*tick_emul)(unsigned long delay, struct ipipe_tick_device
*tdev), int cpu)
* \brief Grab the hardware timer.
*
* rthal_timer_request() grabs and tunes the hardware timer in oneshot
@@ -1033,8 +1035,8 @@ unsigned long long __rthal_generic_full_
* - Linux domain context.
*/

-/*!
- * \fn void rthal_timer_release(void)
+/**
+ * \fn void rthal_timer_release(int cpu)
* \brief Release the hardware timer.
*
* Releases the hardware timer, thus reverting the effect of a
@@ -1042,6 +1044,8 @@ unsigned long long __rthal_generic_full_
* is shared with Linux, a periodic setup suitable for the Linux
* kernel will be reset.
*
+ * @param cpu The CPU number the timer was grabbed from.
+ *
* Environments:
*
* This service can be called from:
Index: xenomai/doc/doxygen/Doxyfile-common.in
===================================================================
--- xenomai.orig/doc/doxygen/Doxyfile-common.in
+++ xenomai/doc/doxygen/Doxyfile-common.in
@@ -690,7 +690,8 @@ PREDEFINED = DOXYGEN_CPP \
CONFIG_XENO_OPT_POSIX_INTR \
CONFIG_XENO_OPT_RTAI_FIFO \
CONFIG_XENO_OPT_RTAI_SEM \
- CONFIG_XENO_OPT_RTAI_SHM
+ CONFIG_XENO_OPT_RTAI_SHM \
+ CONFIG_GENERIC_CLOCKEVENTS

# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then
# this tag can be used to specify a list of macro names that should be
expanded.

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Xenomai-core mailing list
Xenomai-core@xxxxxxx
https://mail.gna.org/listinfo/xenomai-core
Was this page helpful?
Yes No
Thread at a glance:

Previous Message by Date: click to view message preview

Re: Summary: Xenomai 2.3.2 and 2.4 lock-ups and OOPSes

On Thu, 2007-09-13 at 10:06 +0200, Peter Soetens wrote: > > > > Please point me at the actual Orocos test code that breaks, with the > > hope to get a fairly standalone test case from it; if you do have a > > standalone test case already, this would be even better. I intend to > > address this issue asap. > > I stripped the OS layer of Orocos for xenomai and built a testcase, which > causes a complete lockup with that. In order to avoid the lock-up, comment > some thread/mutex/semaphore creations. All these classes call the functions > from fosi.c and fosi_internal_join.cpp. So the testcase could be reduced to > call only these functions... > It seems you need to construct a number of threads and mutexes in the > same application before it happens. With only 'little' use of these > primitives, our applications run fine 1000's times in a row. Ok. I can confirm that something tragically bugous is happening at nucleus level when running this testcase. So far, I already triggered the -ENOMEM issue, and a nifty crash during task creation. I'll dig this, thanks. -- Philippe.

Next Message by Date: click to view message preview

Re: [FIX] Summary: Xenomai 2.3.2 and 2.4 lock-ups and OOPSes

On Fri, 2007-09-07 at 11:27 +0200, Peter Soetens wrote: > Just in case you hooked off the long discussion about the issues we found from > Xenomai 2.3.2 on: > > o We are using the xeno_native skin, create Xeno tasks and semaphores, but > have strong indications that the crashes are caused by the memory allocation > scheme of Xenomai in combination with task creation/deletion > o We found two ways to break Xenomai, causing a 'Killed' (rt_task_delete) > and causing an OOPS (rt_task_join). > o They happen on 2.6.20 and 2.6.22 kernels > o On the 2.3 branch, r2429 works, r2433 causes the faults. The patch is > small, and in the ChangLog: > Please try this patch against v2.3.x. A double free issue on a task TCB already scheduled for memory release was causing all sorts of troubles, basically trashing the system heap afterwards: Index: ChangeLog =================================================================== --- ChangeLog (revision 2990) +++ ChangeLog (revision 2992) @@ -1,3 +1,19 @@ +2007-09-15 Philippe Gerum <rpm@xxxxxxxxxxx> + + * ksrc/skins/vrtx/syscall.c (__sc_tecreate): + * ksrc/skins/vxworks/syscall.c (__wind_task_init): + * ksrc/skins/native/syscall.c (__rt_task_create): Protect against + duplicate TCB memory release (first issued by the deletion hook) + upon task creation error. + + * ksrc/skins/native/syscall.c (__rt_task_create): Make sure we + attempt to release the TCB memory after any failure to shadow the + task. + + * ksrc/skins/native/task.c (rt_task_create): Get out faster from + the error case by calling xnpod_delete_thread() upon registration + failure. + 2007-09-04 Johan Borkhuis <j.borkhuis@xxxxxxxxxxxxx> * ksrc/nucleus/pod.c: Make the watchdog timeout value configurable. Index: ksrc/skins/vrtx/syscall.c =================================================================== --- ksrc/skins/vrtx/syscall.c (revision 2990) +++ ksrc/skins/vrtx/syscall.c (revision 2992) @@ -86,6 +86,8 @@ goto done; } + xnthread_clear_state(&task->threadbase, XNZOMBIE); + tid = sc_tecreate_inner(task, NULL, tid, prio, mode, 0, 0, NULL, 0, &err); @@ -98,7 +100,7 @@ err = xnshadow_map(&task->threadbase, u_completion); } - if (err) + if (err && !xnthread_test_state(&task->threadbase, XNZOMBIE)) xnfree(task); done: Index: ksrc/skins/vxworks/syscall.c =================================================================== --- ksrc/skins/vxworks/syscall.c (revision 2990) +++ ksrc/skins/vxworks/syscall.c (revision 2992) @@ -111,6 +111,8 @@ return -ENOMEM; } + xnthread_clear_state(&task->threadbase, XNZOMBIE); + /* Force FPU support in user-space. This will lead to a no-op if the platform does not support it. */ @@ -132,7 +134,7 @@ xnshadow_signal_completion(u_completion, err); } - if (err) + if (err && !xnthread_test_state(&task->threadbase, XNZOMBIE)) xnfree(task); return err; Index: ksrc/skins/native/task.c =================================================================== --- ksrc/skins/native/task.c (revision 2990) +++ ksrc/skins/native/task.c (revision 2992) @@ -286,7 +286,7 @@ &xnthread_handle(&task->thread_base), NULL); if (err) - rt_task_delete(task); + xnpod_delete_thread(&task->thread_base); else if (!*name) /* /proc/xenomai/sched will dump no name for the anonymous task, but the registry still has a stable reference Index: ksrc/skins/native/syscall.c =================================================================== --- ksrc/skins/native/syscall.c (revision 2990) +++ ksrc/skins/native/syscall.c (revision 2992) @@ -125,8 +125,8 @@ char name[XNOBJECT_NAME_LEN]; struct rt_arg_bulk bulk; RT_TASK_PLACEHOLDER ph; + RT_TASK *task = NULL; int err, prio, mode; - RT_TASK *task; /* Completion descriptor our parent thread is pending on -- may be NULL. */ u_completion = (xncompletion_t __user *)__xn_reg_arg2(regs); @@ -170,6 +170,8 @@ goto fail; } + xnthread_clear_state(&task->thread_base, XNZOMBIE); + /* Force FPU support in user-space. This will lead to a no-op if the platform does not support it. */ @@ -183,13 +185,21 @@ sizeof(ph)); err = xnshadow_map(&task->thread_base, u_completion); } else { - xnfree(task); /* Unblock and pass back error code. */ fail: if (u_completion) xnshadow_signal_completion(u_completion, err); } + /* Task memory could have been released by an indirect call to + * the deletion hook, after xnpod_delete_thread() has been + * issued from rt_task_create() (e.g. upon registration + * error). We avoid double memory release when the XNZOMBIE + * flag is raised, meaning the deletion hook has run, and the + * TCB memory is already scheduled for release. */ + if (err && task != NULL && !xnthread_test_state(&task->thread_base, XNZOMBIE)) + xnfree(task); + return err; } -- Philippe.

Previous Message by Thread: click to view message preview

Xenomai v2.4-rc3

Here is the third candidate release for the v2.4.x branch. Most of the work since -rc2 was aimed at optimizing the interrupt pipeline, and first and foremost at reducing its cache footprints, initially for the powerpc and x86 ports. Other archs will be upgraded next. The powerpc arch also gains a combined 32/64bit support starting with 2.6.22. Short log follows: [nucleus] * Make the watchdog timeout value configurable. * Remove preprocessor warnings from 2.4 builds. * Always get references to per-cpu sched struct within migration-free sections. [rtdm] * Round up timeouts and delays when nanoseconds are to be converted to ticks (periodic timebase only). [can] * Fix race upon socket list update. * RT-Socket-CAN SJA1000 driver for the EMS CPC PCI card (http://www.ems-wuensche.de). [powerpc] * Merge 32/64bit arch support into a single Adeos patch for 2.6.22 (I-pipe 2.0 series, DENX tree: DENX-2007-08-30-1748). * Upgrade combined Adeos support to 2.6.23-rc5 (DENX tree, git HEAD). * PA-Semi (powerpc64) updates. * Update Adeos/powerpc32 support for 2.6.20; forward port to 2.6.21. [i386] * Release tick device in the non-LAPIC case (kernel >= 2.6.22). * Upgrade Adeos support for 2.6.22 (I-pipe 1.10 series). We still have a few reported bugs pending and some I-pipe updates for the Blackfin, ARM and x86_64 ports to come too, so we will need -rc4. http://download.gna.org/xenomai/testing/xenomai-2.4-rc3.tar.bz2 -- Philippe.

Next Message by Thread: click to view message preview

Xenomai v2.3.4

Here is the latest release from the stable tree. Several Adeos patches have been updated due to a nasty bug that may lock out hw interrupts unexpectedly when dumping the pipeline trace buffers (CONFIG_IPIPE_TRACE=y) using the /proc interface; update is strongly recommended if you rely on the tracer for debugging. Short log follows: [nucleus] * Make the watchdog timeout value configurable * Fix build with CONFIG_XENO_OPT_RPIDISABLED=n * Fix shared interrupt handling. [native, vxworks, vrtx] * Fix double TCB memory release upon task mapping error. [can] * Fix race upon socket list update. [powerpc] * Make sure rthal_thread_switch() is properly paired with Linux's switch_to() (return value fix for ppc64). * Adeos update (I-pipe 2.6.20-1.6-04, 2.6.21-1.6-04) [arm] * Adeos update (I-pipe 2.6.20-1.7-06). [i386] * Adeos update (I-pipe 2.6.20-1.8-08). See the ChangeLog for details. http://download.gna.org/xenomai/stable/xenomai-2.3.4.tar.bz2 -- Philippe.
Sign up for updates to this mailing list. email:
Loading Comments...
Home | News | Patents | Sitemap | FAQ | advertise

Advertising by