summaryrefslogtreecommitdiffstats
path: root/cpukit/libmisc/monitor/mon-prmisc.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2022-03-24cpukit/libmisc/monitor/: Manually change to BSD-2 licenseJoel Sherrill1-3/+31
This code did not have any copyrights or licenses and a bit of archeology was needed to determine authorship. This code was in the initial import into the RTEMS CVS repository when it was established in May 1995. There was very little, if any, code not written by OAR Corporation in that initial import. After discussion with Chris Johns, it was determined that this code was from OAR Corporation and that he had added a few features later. Both Chris Johns and OAR Corporation have given permission to relicense. Updates #3053.
2018-11-21score: Remove support for RTEMS_USE_16_BIT_OBJECTSebastian Huber1-4/+0
The RTEMS_USE_16_BIT_OBJECT define is not set by an RTEMS port. Remove support for 16-bit object identifiers. If someone really wants to use RTEMS on a 16-bit target, then it is better to use self-contained objects instead of playing around with object identifier optimizations. Update #3603.
2017-01-12Add and use rtems_assoc_thread_states_to_string()Sebastian Huber1-40/+3
2017-01-12score: Replace STATES_DELAYINGSebastian Huber1-1/+0
Replace STATES_DELAYING with STATES_WAITING_FOR_TIME. There is no need for separate timeout thread states. The Thread_Control::Timer::header and Watchdog_Control::cpu members can be used to figure out the kind of timeout.
2017-01-11score: Add STATES_THREAD_QUEUE_WITH_IDENTIFIERSebastian Huber1-10/+12
Add thread state bit to identify thread queues that are embedded in an object with identifier.
2017-01-11score: Delete STATES_WAITING_FOR_BUFFERSebastian Huber1-2/+0
2016-05-20score: Rework _Thread_Restart_other()Sebastian Huber1-1/+1
Rework _Thread_Restart_other() to use _Thread_Change_life_locked(). Cope with concurrent change requests by means of a pending request counter. Update #2555. Update #2626.
2016-05-20score: Add _Thread_Join() and _Thread_Cancel()Sebastian Huber1-1/+0
Split _Thread_Close() into _Thread_Join() and _Thread_Cancel() to prepare for a re-use in pthread_join() and pthread_cancel(). Update #2555. Update #2626.
2016-05-12score: Avoid Giant lock _Scheduler_Set_affinity()Sebastian Huber1-1/+0
Update #2555.
2016-03-24libmisc/monitor/mon-prmisc.c: Remove unused rtems_monitor_events_assocJoel Sherrill1-36/+0
2015-07-30score: Add self-contained condition implementationSebastian Huber1-0/+1
2015-07-30score: Add self-contained futex implementationSebastian Huber1-0/+1
2015-07-30score: Add self-contained semaphore implementationSebastian Huber1-0/+1
2015-07-30score: Add self-contained mutex implementationSebastian Huber1-0/+1
This mutex implementation uses a thread priority queue with a simple priority inheritance mechanism (similar to the object based mutexes). The storage space must be supplied by the user (16 bytes on 32-bit targets).
2015-07-24monitor: Sort alphabeticallySebastian Huber1-15/+15
2015-07-24monitor: Print addresses like identifiersSebastian Huber1-2/+2
This avoids the "0x0xabc" output and is more compact.
2015-07-24monitor: Remove notepad supportSebastian Huber1-16/+0
2015-04-23score: Fix POSIX thread joinSebastian Huber1-0/+1
A thread join is twofold. There is one thread that exists and an arbitrary number of threads that wait for the thread exit (one-to-many relation). The exiting thread may want to wait for a thread that wants to join its exit (STATES_WAITING_FOR_JOIN_AT_EXIT in _POSIX_Thread_Exit()). On the other side we need a thread queue for all the threads that wait for the exit of one particular thread (STATES_WAITING_FOR_JOIN in pthread_join()). Update #2035.
2015-03-24monitor: Fix notepad dumpSebastian Huber1-4/+7
2014-12-03monitor: Replace puts() with proper fprintf()Sebastian Huber1-1/+1
2014-11-26monitor/mon-prmisc.c: Use puts() not fprintf()Josh Oguin1-1/+1
CodeSonar flagged this as a case where the user could inject a format string and cause issues. Since we were not printing anything but a string, just switching to puts() rather than fprintf(stdout,...) was sufficient to make this code safer.
2014-05-15score: Simplify _Thread_Change_priority()Sebastian Huber1-1/+0
The function to change a thread priority was too complex. Simplify it with a new scheduler operation. This increases the average case performance due to the simplified logic. The interrupt disabled critical section is a bit prolonged since now the extract, update and enqueue steps are executed atomically. This should however not impact the worst-case interrupt latency since at least for the Deterministic Priority Scheduler this sequence can be carried out with a wee bit of instructions and no loops. Add _Scheduler_Change_priority() to replace the sequence of - _Thread_Set_transient(), - _Scheduler_Extract(), - _Scheduler_Enqueue(), and - _Scheduler_Enqueue_first(). Delete STATES_TRANSIENT, _States_Is_transient() and _Thread_Set_transient() since this state is now superfluous. With this change it is possible to get rid of the SCHEDULER_SMP_NODE_IN_THE_AIR state. This considerably simplifies the implementation of the new SMP locking protocols.
2014-05-14score: Add STATES_RESTARTINGSebastian Huber1-0/+1
Use separate state for thread restart.
2014-05-14monitor: Support STATES_MIGRATINGSebastian Huber1-0/+1
2014-03-31score: Thread life cycle re-implementationSebastian Huber1-0/+2
The thread deletion is now supported on SMP. This change fixes the following PRs: PR1814: SMP race condition between stack free and dispatch PR2035: psxcancel reveals NULL pointer access in _Thread_queue_Extract() The POSIX cleanup handler are now called in the right context (should be called in the context of the terminating thread). http://pubs.opengroup.org/onlinepubs/009695399/functions/xsh_chap02_09.html Add a user extension the reflects a thread termination event. This is used to reclaim the Newlib reentrancy structure (may use file operations), the POSIX cleanup handlers and the POSIX key destructors.
2013-11-14monitor: Add support for BSD wakeup stateSebastian Huber1-0/+1
2013-07-26score: Create states implementation headerSebastian Huber1-1/+1
Move implementation specific parts of states.h and states.inl into new header file statesimpl.h. The states.h contains now only the application visible API.
2013-07-23rtems: Create event implementation headerSebastian Huber1-1/+1
Move implementation specific parts of event.h, event.inl, eventset.h and eventset.inl into new header file eventimpl.h. The event.h contains now only the application visible API.
2012-11-02monitor: Support for system eventsSebastian Huber1-0/+1
2012-05-11Remove All CVS Id Strings Possible Using a ScriptJoel Sherrill1-2/+0
Script does what is expected and tries to do it as smartly as possible. + remove occurrences of two blank comment lines next to each other after Id string line removed. + remove entire comment blocks which only exited to contain CVS Ids + If the processing left a blank line at the top of a file, it was removed.
2011-12-062011-12-06 Ralf Corsépius <ralf.corsepius@rtems.org>Ralf Corsepius1-2/+2
* libmisc/monitor/mon-network.c: Include <rtems/monitor.h>. * libmisc/monitor/mon-object.c: Make rtems_monitor_object_canonical_next_remote, rtems_monitor_object_dump_1, rtems_monitor_object_dump_all static. * libmisc/monitor/mon-prmisc.c: Make rtems_monitor_dump_assoc_bitfield static. * libmisc/monitor/mon-symbols.c: Make rtems_monitor_symbol_dump_all static.
2011-03-072011-03-07 Sebastian Huber <sebastian.huber@embedded-brains.de>Sebastian Huber1-1/+1
* include/rtems/irq-extension.h: Documentation. * libmisc/monitor/mon-prmisc.c: Fix for multiprocessing configuration.
2010-04-12Add rtems_monitor_dump_addr().Ralf Corsepius1-0/+6
2009-11-29Whitespace removal.Ralf Corsepius1-1/+1
2009-10-022009-10-02 Ralf Corsépius <ralf.corsepius@rtems.org>Ralf Corsepius1-0/+4
* libmisc/monitor/mon-prmisc.c: Fix warning if defined(RTEMS_USE_16_BIT_OBJECT).
2008-12-182008-12-18 Sebastian Huber <sebastian.huber@embedded-brains.de>Joel Sherrill1-6/+6
* libmisc/serdbg/termios_printk.c, libmisc/serdbg/termios_printk.h: Fixed incompatible return value. * libmisc/cpuuse/cpuusagereport.c: Changed output format. * libmisc/Makefile.am, libmisc/monitor/mon-editor.c: New file. * libmisc/capture/capture-cli.c, libmisc/monitor/mon-command.c, libmisc/monitor/mon-monitor.c, libmisc/monitor/mon-object.c, libmisc/monitor/mon-prmisc.c, libmisc/monitor/mon-symbols.c, libmisc/monitor/monitor.h, libmisc/shell/cat_file.c, libmisc/shell/cmds.c, libmisc/shell/internal.h, libmisc/shell/main_help.c, libmisc/shell/shell.c, libmisc/shell/shell.h, libmisc/shell/shell_cmdset.c, libmisc/shell/shell_getchar.c, libmisc/shell/str2int.c: Various global data is now read only. Added 'const' qualifier to many pointer parameters. It is no longer possible to remove monitor commands. Moved monitor line editor into a separate file to avoid unnecessary dependencies.
2008-09-07Add missing initializers.Ralf Corsepius1-63/+63
2008-07-232008-07-23 Joel Sherrill <joel.sherrill@oarcorp.com>Joel Sherrill1-34/+8
* libmisc/monitor/mon-extension.c, libmisc/monitor/mon-itask.c, libmisc/monitor/mon-part.c, libmisc/monitor/mon-prmisc.c, libmisc/monitor/mon-queue.c, libmisc/monitor/mon-region.c, libmisc/monitor/mon-sema.c, libmisc/monitor/mon-task.c, libmisc/monitor/monitor.h: Use rtems_object_get_name() instead of internal routine. This makes it possible to also print string names of POSIX objects. Adjust task report to realign since we can have longer names.
2008-07-012008-07-01 Joel Sherrill <joel.sherrill@oarcorp.com>Joel Sherrill1-4/+10
* libmisc/monitor/mon-prmisc.c, rtems/include/rtems/rtems/attr.h: Review association tables in monitor.
2006-03-27Eliminate undesired sign-extension.Eric Norum1-1/+1
2004-11-012004-11-01 Ralf Corsepius <ralf_corsepius@rtems.org>Ralf Corsepius1-6/+7
* monitor/monitor.h: Let rtems_monitor_config_dump return int. * monitor/mon-config.c: Ditto. Use PRI*N macros. * monitor/mon-itask.c, monitor/mon-prmisc.c: Use PRI*N macros.
2004-10-272004-10-27 Ralf Corsepius <ralf_corsepius@rtems.org>Ralf Corsepius1-16/+16
* monitor/mon-prmisc.c, monitor/monitor.h: Let rtems_monitor_dump return int's not uint32_t (They are printf return values).
2004-10-212004-10-21 Ralf Corsepius <ralf_corsepius@rtems.org>Ralf Corsepius1-1/+1
* libmisc/monitor/mon-prmisc.c, libmisc/monitor/monitor.h: rtems_monitor_dump_char(char ch).
2004-04-172004-04-17 Ralf Corsepius <ralf_corsepius@rtems.org>Ralf Corsepius1-16/+16
* libmisc/capture/capture-cli.c, libmisc/cpuuse/cpuuse.c, libmisc/dumpbuf/dumpbuf.c, libmisc/fsmount/fsmount.c, libmisc/monitor/mon-command.c, libmisc/monitor/mon-config.c, libmisc/monitor/mon-dname.c, libmisc/monitor/mon-driver.c, libmisc/monitor/mon-extension.c, libmisc/monitor/mon-itask.c, libmisc/monitor/mon-monitor.c, libmisc/monitor/mon-mpci.c, libmisc/monitor/mon-object.c, libmisc/monitor/mon-prmisc.c, libmisc/monitor/mon-queue.c, libmisc/monitor/mon-symbols.c, libmisc/monitor/mon-task.c, libmisc/rtmonuse/rtmonuse.c, libmisc/shell/cmds.c, libmisc/shell/shell.c, libmisc/shell/shell.h, libmisc/stackchk/check.c, libmisc/untar/untar.c: Use fprintf(stdout,...) instead of printf.
2004-04-16Remove stray white spaces.Ralf Corsepius1-23/+23
2004-03-262004-03-26 Ralf Corsepius <ralf_corsepius@rtems.org>Ralf Corsepius1-31/+31
* libmisc/capture/capture-cli.c, libmisc/capture/capture.c, libmisc/capture/capture.h, libmisc/cpuuse/cpuuse.c, libmisc/devnull/devnull.c, libmisc/fsmount/fsmount.h, libmisc/monitor/mon-config.c, libmisc/monitor/mon-dname.c, libmisc/monitor/mon-driver.c, libmisc/monitor/mon-extension.c, libmisc/monitor/mon-itask.c, libmisc/monitor/mon-monitor.c, libmisc/monitor/mon-mpci.c, libmisc/monitor/mon-object.c, libmisc/monitor/mon-prmisc.c, libmisc/monitor/mon-queue.c, libmisc/monitor/mon-server.c, libmisc/monitor/mon-symbols.c, libmisc/monitor/monitor.h, libmisc/monitor/symbols.h, libmisc/mw-fb/mw_uid.c, libmisc/rtmonuse/rtmonuse.c, libmisc/serdbg/serdbg.h, libmisc/serdbg/serdbgio.c, libmisc/serdbg/termios_printk.c, libmisc/serdbg/termios_printk.h, libmisc/shell/shell.c, libmisc/shell/shell.h, libmisc/stackchk/check.c, libmisc/stackchk/internal.h: Convert to using c99 fixed size types.
2003-07-082003-07-08 Ralf Corsepius <corsepiu@faw.uni-ulm.de>Ralf Corsepius1-0/+4
* capture/capture-cli.c: Add config-header support. * capture/capture.c: Add config-header support. * cpuuse/cpuuse.c: Add config-header support. * devnull/devnull.c: Add config-header support. * dummy/dummy.c: Add config-header support. * dumpbuf/dumpbuf.c: Add config-header support. * monitor/mon-command.c: Add config-header support. * monitor/mon-config.c: Add config-header support. * monitor/mon-dname.c: Add config-header support. * monitor/mon-driver.c: Add config-header support. * monitor/mon-extension.c: Add config-header support. * monitor/mon-itask.c: Add config-header support. * monitor/mon-manager.c: Add config-header support. * monitor/mon-monitor.c: Add config-header support. * monitor/mon-mpci.c: Add config-header support. * monitor/mon-object.c: Add config-header support. * monitor/mon-prmisc.c: Add config-header support. * monitor/mon-queue.c: Add config-header support. * monitor/mon-server.c: Add config-header support. * monitor/mon-symbols.c: Add config-header support. * monitor/mon-task.c: Add config-header support. * mw-fb/mw_fb.c: Add config-header support. * mw-fb/mw_uid.c: Add config-header support. * rtmonuse/rtmonuse.c: Add config-header support. * serdbg/serdbg.c: Add config-header support. * serdbg/serdbgio.c: Add config-header support. * serdbg/termios_printk.c: Add config-header support. * shell/cmds.c: Add config-header support. * stackchk/check.c: Add config-header support. * untar/untar.c: Add config-header support.
2002-03-202002-03-20 Chris Johns <ccj@acm.org>Joel Sherrill1-0/+5
* PR148. * monitor/mon-prmisc.c: Fixed to print task states correctly.
2001-05-242000-05-24 Fernando Ruiz Casas <fernando.ruiz@ctv.es>Joel Sherrill1-2/+2
* monitor/mon-prmisc.c: Correct print line. * shell/Makefile.am: Added new file telnetd.c. * shell/telnetd.c, shell/telnetd.h, shell/pty.c: New files. * shell/shell.c, shell/cmds.c, shell/shell.h: Numerous improvments: - The shell_init has a new parameter 'forever' because in /dev/console you need that this process runs forever but in tcp/ip not. (respawn?) - A new task for every session opened trought tcp/ip telnet client. (the chargen,daytime and more are possible of implementation but I ask me if they are necesary) - Exit from the session delete the task and when the client fails too. - More cmds have been implemented. (very reduced version of these) umask, chmod, id, whoami, rm, cat, ... - A reduced line edit has been implemented. Ctrl-C abort the input, Ctrl-d in the first position gives EOF (logout). '\b' and DEL makes the rubout operation. I think that readline() for every session spents a lot of resources.
1997-12-07Fixed indexing bug reported by Phil Wilshire.Joel Sherrill1-1/+1