diff --git a/src/core/tn_mutex.c b/src/core/tn_mutex.c index 759fec8..00b3180 100644 --- a/src/core/tn_mutex.c +++ b/src/core/tn_mutex.c @@ -628,7 +628,8 @@ static void _update_holders_priority_recursive(struct TN_Task *task) // points to the task which is/was holding the mutex. holder = _get_mutex_by_wait_queque(task->pwait_queue)->holder; - //-- check for infinite recursion and exit if loop is detected + //-- check for infinite recursion and exit if loop is detected. It can + // happen if the kernel is recovering from a deadlock. if (holder == original) { return; } diff --git a/stuff/doc_pages/changelog.dox b/stuff/doc_pages/changelog.dox index 62cc8a3..ea824f0 100644 --- a/stuff/doc_pages/changelog.dox +++ b/stuff/doc_pages/changelog.dox @@ -7,8 +7,39 @@ TNeo changelog \section changelog_current Current development version (BETA) - - Fixed build without `#TN_USE_MUTEXES` or `#TN_MUTEX_DEADLOCK_DETECT` - - Added support of `-pedantic` mode for Cortex-M architectures +no changes yet + +\section changelog_v1_09 v1.09 + +Release date: 2024-12-28 + +Most of the changes are various bugfixes provided by the community. Thanks a +lot guys, I really appreciate the time and effort you spent on making this +project better! + + - Fix: at least on ARM Cortex-M7, and probably also on M3, M4 and some other + ARMs, sometimes the context switch did not happen in time, and it was + causing issues in e.g. `tn_eventgrp_wait`, where the waiting result was + wrong. Thanks to [Anatol Shiro](https://github.com/AnatolShiro) for + identifying and [fixing this bug](https://github.com/dimonomid/tneo/commit/d036aa22269eb1d3557c2d1b6df4fd41fd1c55ec); + - Fix: when the system is recovering from a deadlock (when one of the tasks + stopped waiting after a timeout), the kernel was stuck in an endless loop. + Thanks to [Travis Griggs](https://github.com/travisgriggs) for identifying + and [fixing this bug](https://github.com/dimonomid/tneo/commit/2d8e8d38635413fdd86fb7934b18e3637b3ffa04), + as part of his effort to [implement an even better set of tests for + TNeo](https://github.com/travisgriggs/tneo_tests); + - Fix: when creating a higher-priority task from a lower-priority task, + and the `TN_TASK_CREATE_OPT_START` flag was set, the kernel should switch + context to the new task right away, but it wasn't happening. Again, thanks + to [Travis Griggs](https://github.com/travisgriggs) for [this + fix](https://github.com/dimonomid/tneo/commit/9d886c9448b9d93dcb07309bcc5b45c84a1bfdd9); + - Fix: the project was unable to build for 64-bit platforms where `unsigned + long int` and `int` have different sizes. Thanks to + [alecoding](https://github.com/alecoding) for + [the fix](https://github.com/dimonomid/tneo/commit/5a89f5a39dd6ed60e09f4c0385aba294944f1265); + - Fix: the project was unable to build without `#TN_USE_MUTEXES` or + `#TN_MUTEX_DEADLOCK_DETECT`; + - Added support of `-pedantic` mode for Cortex-M architectures. \section changelog_v1_08 v1.08 diff --git a/stuff/doxygen/README.md b/stuff/doxygen/README.md new file mode 100644 index 0000000..0e8c944 --- /dev/null +++ b/stuff/doxygen/README.md @@ -0,0 +1,16 @@ +# Doxygen documentation for TNeo + +Having Doxygen and latex installed, here's how to generate documentation for a +new release: + +``` +$ make +$ bash ./publish_doc_release.sh v1.09 +``` + +(where `v1.09` is the git tag for the new version) + +To generate docs for a development (not yet released) version, use `bash +./publish_doc_dev.sh` instead of the last command. + +TODO: make a Dockerfile with all the dependencies. diff --git a/stuff/doxygen/publish_doc_dev.sh b/stuff/doxygen/publish_doc_dev.sh index 9c68d82..96b1d49 100755 --- a/stuff/doxygen/publish_doc_dev.sh +++ b/stuff/doxygen/publish_doc_dev.sh @@ -1,26 +1,27 @@ #!/bin/bash +set -e + # get version string version_string="$(bash ../scripts/git_ver_echo.sh)" -echo "TNeo version: $version_string" # generate commit message new_commit_message="docs updated: $version_string" # make sure we have docs repo -if ! [ -d ./dfrank.bitbucket.org ]; then +if ! [ -d ./dimonomid.github.io ]; then # clone docs repo - hg clone ssh://hg@bitbucket.org/dfrank/dfrank.bitbucket.org + git clone git@github.com:dimonomid/dimonomid.github.io fi # now, docs repo should be cloned in any case, go to it -cd dfrank.bitbucket.org +cd dimonomid.github.io # make sure we have the latest revision -hg pull -u +git pull origin master # check last commit message -last_commit_message="$(hg log -l1 --template '{desc}')" +last_commit_message="$(git log -1 --pretty=%B)" # go back cd .. @@ -31,7 +32,6 @@ if [[ "$new_commit_message" == "$last_commit_message" ]]; then exit 0 fi - # ---- tneo repo has changed, so, continue ---- # remove all current output @@ -51,7 +51,7 @@ mv refman.pdf tneo.pdf cd ../.. # go to dev documentation dir -cd dfrank.bitbucket.org/tneokernel_api/dev +cd dimonomid.github.io/tneokernel_api/dev # remove everything from there rm -r ./* @@ -60,20 +60,16 @@ rm -r ./* cp -r ../../../output/* . # addremove -hg addremove +git add -A # commit -hg ci -m"$new_commit_message" +git commit -m"$new_commit_message" -# push it -# COMMENTED to be more safe -# hg push echo "--------------------------------------------------------------------------" -echo "DON'T FORGET to push your changes now, if everything is ok:" -echo " $ cd dfrank.bitbucket.org" -echo " $ hg push" +echo "DON'T FORGET:" +echo " 1. Add the new version link to dimonomid.github.io/tneokernel_api/index.html" +echo " 2. Git push" echo "--------------------------------------------------------------------------" # go back cd ../../.. - diff --git a/stuff/doxygen/publish_doc_release.sh b/stuff/doxygen/publish_doc_release.sh index 013ce3e..204c5a5 100644 --- a/stuff/doxygen/publish_doc_release.sh +++ b/stuff/doxygen/publish_doc_release.sh @@ -1,5 +1,7 @@ #!/bin/bash +set -e + # get tag name to generate docs for target_tag_name="$1" @@ -19,19 +21,19 @@ version_string="$(bash ../scripts/git_ver_echo.sh)" new_commit_message="docs updated: $version_string" # make sure we have docs repo -if ! [ -d ./dfrank.bitbucket.org ]; then +if ! [ -d ./dimonomid.github.io ]; then # clone docs repo - hg clone ssh://hg@bitbucket.org/dfrank/dfrank.bitbucket.org + git clone git@github.com:dimonomid/dimonomid.github.io fi # now, docs repo should be cloned in any case, go to it -cd dfrank.bitbucket.org +cd dimonomid.github.io # make sure we have the latest revision -hg pull -u +git pull origin master # check last commit message -last_commit_message="$(hg log -l1 --template '{desc}')" +last_commit_message="$(git log -1 --pretty=%B)" # go back cd .. @@ -42,7 +44,6 @@ if [[ "$new_commit_message" == "$last_commit_message" ]]; then exit 0 fi - # ---- tneo repo has changed, so, continue ---- # remove all current output @@ -62,7 +63,7 @@ mv refman.pdf tneo.pdf cd ../.. # go to latest stable documentation dir -cd dfrank.bitbucket.org/tneokernel_api/latest +cd dimonomid.github.io/tneokernel_api/latest # remove everything from there rm -r ./* @@ -74,18 +75,15 @@ cp -r ../../../output/* . cp -r . ../$target_tag_name # addremove -hg addremove +git add -A # commit -hg ci -m"$new_commit_message" +git commit -m"$new_commit_message" -# push it -# COMMENTED to be more safe -# hg push echo "--------------------------------------------------------------------------" -echo "DON'T FORGET to push your changes now, if everything is ok:" -echo " $ cd dfrank.bitbucket.org" -echo " $ hg push" +echo "DON'T FORGET:" +echo " 1. Add the new version link to dimonomid.github.io/tneokernel_api/index.html" +echo " 2. Git push" echo "--------------------------------------------------------------------------" # go back @@ -93,4 +91,3 @@ cd ../../.. # update repo to the tip git checkout master -