summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2014-10-14kernel/timer: change row_lvl to unsignedGrissiom
Use signed int as array index is unsecure.
2014-09-19Update device.cBernard Xiong
2014-09-11Merge branch 'master' of https://github.com/RT-Thread/rt-threadbernard
2014-09-11[Kernel] Use stream mode to open console device.bernard
2014-09-11[Kernel] comments clean up.bernard
2014-09-11[Kernel] comments clean up.bernard
2014-09-02kernel/idle: fix rt_thread_idle_excute in high optimization levelGrissiom
The rt_list_isempty has prototype of "int rt_list_isempty(const rt_list_t *l)". So the compiler has a good reason that the rt_thread_defunct list does not change within rt_thread_idle_excute thus optimize the "while" loop into a "if". So add the volatile qualifier when test against the rt_thread_defunc list.
2014-08-24fix:comment spelling mistaketcz717
relation=>relocation
2014-08-20kernel: mempool: fix race condition in rt_mp_allocGrissiom
When thread wake up from waiting for memory, there is a chance that there is no memory available in high pressure. So use a loop to check again. Otherwise, there will be a NULL reference.
2014-07-21[Kernel] Better documentation for doxygen.bernard
2014-07-21[Kernel] The rt_object_find routine can support to find an object inside a ↵bernard
module. The usage is: rt_object_find("module_name/object_name").
2014-07-16src/timer: fix a compile warningGrissiom
2014-07-12[Kernel] system does not lock scheduler when invoking soft-timer timeout ↵bernard
function.
2014-07-10[Kernel] Remove rt_device_init_all implemetation.bernard
2014-06-26Add WEAK definition;bernard
2014-06-18device: only increase the ref_count when device is truly openedGrissiom
2014-04-16[mempool] reset the thread->error before suspending threadGrissiom
Time out result and other errors is recorded in thread->error. Dirty error will screw up the error handling code after the thread has been wake up.
2014-04-02[Kernel] Change command line to const parameter and add system() function.bernard
2014-03-11[Kernel] declare more APIs in modulebernard
2014-03-11[Kernel] stop thread timer when suspend a threadbernard
2014-01-11[Kernel] application module can support argumentsbernard
2013-12-21kernel: let rt_thread_idle_excute loop until there is no dead threadGrissiom
Out side world is difficult to tell whethere there is dead thread remaining. If rt_thread_idle_excute only do one cleanup, it's hard to finish cleanups outside the idle thread. So let is loop and do all the cleanups in one call.
2013-12-21kernel: add rt_critical_level that return the lock count of schedulerGrissiom
Out side world may be interested in whether the scheduler is locked or not. Provide an API to tell that.
2013-10-19kernel: timer: fix compiling bug in d59aa279c37b7Grissiom
2013-10-17Merge pull request #173 from grissiom/new-timerBernard Xiong
kernel: use skip list to implement timer list
2013-10-17Merge pull request #161 from aozima/pullsBernard Xiong
make sure the device is in STREAM mode when used by rt_kprintf.
2013-10-14kernel: mutex could only be released in thread contextGrissiom
Mutex has the idea of ownership, only the thread which owns the mutex can release it. So rt_mutex_release could only be called in thread context. Add a debug guard to it.
2013-10-12kernel: use skip list to implement timer listGrissiom
Skip list is a "random" data structure that in high possibilities it would get O(log(N)) time complexity in inserting while the old list get O(N). Forthermore, when set RT_TIMER_SKIP_LIST_LEVEL to 1, it will just the same as the old double linked list, both in time and space complexity. Benchmarks shows that when RT_TIMER_SKIP_LIST_LEVEL is 3, the average time of random insertion of new timer is about 2 times faster than the old timer when there are 100 timers and 3 times faster when there are 200 timers. However, it restores the deprecated funcion rt_system_timer_init. BSPs must invoke it upon system startup.
2013-10-11kernel: add RT_DEBUG_IN_THREAD_CONTEXTGrissiom
In thread context means: 1) the scheduler has been started; 2) not in interrupt context. It is more stronger than RT_DEBUG_NOT_IN_INTERRUPT. With this commit, you will catch the error on situations like taking mutex before scheduling instead of crashing on NULL pointer reference.
2013-09-24update rt_kprintf: make sure the device is in STREAM mode when used by ↵aozima
rt_kprintf.
2013-09-23kservice: export vsnprintf as rt_vsnprintfGrissiom
vsnprintf is a common string function that could be used in many places. Using both vsnprintf in libc and vsnprintf in the RTT could make a bigger image. Moreover, if newlib is not enabled when compiling with GCC, referencing vsnprintf will lead to link error: .../arm-none-eabi/lib/armv7-ar/thumb/softfp/libc.a(lib_a-sbrkr.o): In function `_sbrk_r': sbrkr.c:(.text._sbrk_r+0xc): undefined reference to `_sbrk' collect2: error: ld returned 1 exit status Using rt_vsnprintf could avoid such problem.
2013-09-14rt_event_recv: add a check on the option flagGrissiom
Either RT_EVENT_FLAG_AND or RT_EVENT_FLAG_OR should be set in the option flag. If none of them is present, the waiting thread will never be resumed.
2013-08-19fix debug output of schedulerGrissiom
When print the thread names, we should use "%.*s" instead of bare "%s".
2013-07-22add mount tablebernard
2013-07-15memheap: dont alloc/memcpy when there is next node is enough for reallocGrissiom
When realloc a bigger space and the next node is free and big enough, we should directly relocate the next node instead of doing alloc/memcpy. The new method not only faster in this cases, it would avoid memory fragment as well.
2013-07-11fix the memory block splitting issueBernard Xiong
2013-07-09device: add ref_count supportGrissiom
This is a simple work around to the current device stack design. A ref_count could let different modules to open/close the same device independently without interfere others in some degree. But there is still some data shared between the modules, like flag, open_flag and user_data. Moreover, it won't yield an error if A open a device, and B read from it before open it in B. Maybe alloc a new handle in rt_device_open will be the ultimate solution. But that is much bigger change and we may leave it to future development.
2013-06-29reformat the coding styleyiyue.fang
convert Tabs to spaces
2013-06-24Embedded GPLv2 license.Bernard Xiong
2013-06-24Update kservice.cBernard Xiong
2013-06-23Add component initialization.Bernard Xiong
2013-06-03Fix the memheap_realloc issueBernard Xiong
2013-04-25add RT_KERNEL_MALLOC/FREEBernard Xiong
2013-04-17add rt_memheap_realloc functionBernard Xiong
2013-04-10update the version informationyiyue.fang
2006 - 2013 Copyright by rt-thread team
2013-03-23implement __rt_ffs in kernel service libraryBernard Xiong
2013-01-17more deterministic on timerGrissiom
If two timer will timeout at the same tick, the one started later will be called later. I've tested the patch on simulator and it _seems_ OK. Reported-by: xdzy on the forum and delin17 <[email protected]>
2013-01-08convert end of lineBernard Xiong
2012-12-30fixed the coding style in memheap.c[email protected]
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@2569 bbd45198-f89e-11dd-88c7-29a3b14d5316
2012-12-29Add RT_USING_MEMHEAP_AS_HEAP feature: system can use "heap" memheap as ↵[email protected]
system default memory heap. git-svn-id: https://rt-thread.googlecode.com/svn/trunk@2554 bbd45198-f89e-11dd-88c7-29a3b14d5316