summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2015-01-19Prepare for RT-Thread 1.2.4 release.v1.2.4bernard
2014-11-01Prepare RT-Thread 1.2.3 release.bernard
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. Commit b8bf6bef76bdabe76749c752217afbe5d24ba371 from master.
2014-08-01[Kernel] fix spell wrong in comments.bernard
2014-07-19Merge 2.0.0 modification to prepare v1.2.2 release.bernard
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-08Merge remote-tracking branch 'origin/master' into stable-v1.2.xv1.2.1bernard
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
2012-12-25fixed coding style in src/slab.c[email protected]
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@2527 bbd45198-f89e-11dd-88c7-29a3b14d5316
2012-12-25fixed coding style in src/scheduler.c[email protected]
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@2526 bbd45198-f89e-11dd-88c7-29a3b14d5316
2012-12-25fixed coding style in src/mempool.c[email protected]
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@2525 bbd45198-f89e-11dd-88c7-29a3b14d5316
2012-12-25fixed coding style in src/memheap.c[email protected]
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@2524 bbd45198-f89e-11dd-88c7-29a3b14d5316
2012-12-25fixed coding style in src/mem.c[email protected]
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@2523 bbd45198-f89e-11dd-88c7-29a3b14d5316
2012-12-25fixed coding style in kservice.c[email protected]
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@2522 bbd45198-f89e-11dd-88c7-29a3b14d5316
2012-12-25fixed the coding style in object.c[email protected]
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@2521 bbd45198-f89e-11dd-88c7-29a3b14d5316
2012-12-25fixed the coding style in ipc.c[email protected]
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@2520 bbd45198-f89e-11dd-88c7-29a3b14d5316
2012-12-25return RT_EOK if the device interface not exist.bernard.xiong
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@2519 bbd45198-f89e-11dd-88c7-29a3b14d5316
2012-12-22fix rt_kprintf issue, which found by Grissiom.[email protected]
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@2507 bbd45198-f89e-11dd-88c7-29a3b14d5316
2012-12-21fixed the coding style in thread.c[email protected]
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@2506 bbd45198-f89e-11dd-88c7-29a3b14d5316