<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rockbox/firmware/kernel/queue.c, branch puzzlesmanual</title>
<subtitle>My Rockbox tree</subtitle>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/rockbox/'/>
<entry>
<title>Fix dangerous casts</title>
<updated>2017-02-04T16:24:47+00:00</updated>
<author>
<name>Amaury Pouly</name>
<email>amaury.pouly@gmail.com</email>
</author>
<published>2017-01-15T23:10:38+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/rockbox/commit/?id=d7871914acd2ed77f43344e36e08944524a67d9e'/>
<id>d7871914acd2ed77f43344e36e08944524a67d9e</id>
<content type='text'>
On Windows 64-bit, the size of long is 32-bit, thus any pointer to long cast is
not valid. In any case, one should use intptr_t and ptrdiff_t when casting
to integers. This commit attempts to fix all instances reported by GCC.
When relevant, I replaced code by the macros PTR_ADD, ALIGN_UP from system.h

Change-Id: I2273b0e8465d3c4689824717ed5afa5ed238a2dc
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
On Windows 64-bit, the size of long is 32-bit, thus any pointer to long cast is
not valid. In any case, one should use intptr_t and ptrdiff_t when casting
to integers. This commit attempts to fix all instances reported by GCC.
When relevant, I replaced code by the macros PTR_ADD, ALIGN_UP from system.h

Change-Id: I2273b0e8465d3c4689824717ed5afa5ed238a2dc
</pre>
</div>
</content>
</entry>
<entry>
<title>In queue_wait_w_tmo, guarantee wait duration</title>
<updated>2017-02-03T04:51:55+00:00</updated>
<author>
<name>Michael Sevakis</name>
<email>jethead71@rockbox.org</email>
</author>
<published>2017-02-02T21:06:25+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/rockbox/commit/?id=4d4b0c5a07c907efda20771fa6baca6f1c91802e'/>
<id>4d4b0c5a07c907efda20771fa6baca6f1c91802e</id>
<content type='text'>
It is possible to have a thread awoken and subsequently the message
that was placed in the queue has been removed by the time the thread
is able to check the queue. Ensure theads that failed to find a
message do not return prematurely.

It was at worst imprecise when a timeout is specified. It's entirely
incorrect if the function ever returns with SYS_TIMEOUT when using
TIMEOUT_BLOCK.

Change-Id: Ibd41eae8c787adf7a320a24603cf64ff8a6da66a
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It is possible to have a thread awoken and subsequently the message
that was placed in the queue has been removed by the time the thread
is able to check the queue. Ensure theads that failed to find a
message do not return prematurely.

It was at worst imprecise when a timeout is specified. It's entirely
incorrect if the function ever returns with SYS_TIMEOUT when using
TIMEOUT_BLOCK.

Change-Id: Ibd41eae8c787adf7a320a24603cf64ff8a6da66a
</pre>
</div>
</content>
</entry>
<entry>
<title>Add CPU mode asserts to kernel on blocking functions.</title>
<updated>2017-01-21T19:25:52+00:00</updated>
<author>
<name>Michael Sevakis</name>
<email>jethead71@rockbox.org</email>
</author>
<published>2017-01-21T19:18:37+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/rockbox/commit/?id=3e738661108fb2a8e3474c6336c2a5c2668f82b6'/>
<id>3e738661108fb2a8e3474c6336c2a5c2668f82b6</id>
<content type='text'>
This scourge finds it's way back in far too often.
Right now, only defined for ARM.

Have fun!

Change-Id: Ib21be09ebf71dec10dc652a7a664779251f49644
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This scourge finds it's way back in far too often.
Right now, only defined for ARM.

Have fun!

Change-Id: Ib21be09ebf71dec10dc652a7a664779251f49644
</pre>
</div>
</content>
</entry>
<entry>
<title>Base scheduler queues off linked lists and do cleanup/consolidation</title>
<updated>2014-08-16T09:15:37+00:00</updated>
<author>
<name>Michael Sevakis</name>
<email>jethead71@rockbox.org</email>
</author>
<published>2014-08-08T10:33:51+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/rockbox/commit/?id=6ed00870abd566d7267d2436c2693f5a281cda2f'/>
<id>6ed00870abd566d7267d2436c2693f5a281cda2f</id>
<content type='text'>
Abstracts threading from itself a bit, changes the way its queues are
handled and does type hiding for that as well.

Do alot here due to already required major brain surgery.

Threads may now be on a run queue and a wait queue simultaneously so
that the expired timer only has to wake the thread but not remove it
from the wait queue which simplifies the implicit wake handling.

List formats change for wait queues-- doubly-linked, not circular.
Timeout queue is now singly-linked. The run queue is still circular
as before.

Adds a better thread slot allocator that may keep the slot marked as
used regardless of the thread state. Assists in dumping special tasks
that switch_thread was tasked to perform (blocking tasks).

Deletes alot of code yet surprisingly, gets larger than expected.
Well, I'm not not minding that for the time being-- omlettes and break
a few eggs and all that.

Change-Id: I0834d7bb16b2aecb2f63b58886eeda6ae4f29d59
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Abstracts threading from itself a bit, changes the way its queues are
handled and does type hiding for that as well.

Do alot here due to already required major brain surgery.

Threads may now be on a run queue and a wait queue simultaneously so
that the expired timer only has to wake the thread but not remove it
from the wait queue which simplifies the implicit wake handling.

List formats change for wait queues-- doubly-linked, not circular.
Timeout queue is now singly-linked. The run queue is still circular
as before.

Adds a better thread slot allocator that may keep the slot marked as
used regardless of the thread state. Assists in dumping special tasks
that switch_thread was tasked to perform (blocking tasks).

Deletes alot of code yet surprisingly, gets larger than expected.
Well, I'm not not minding that for the time being-- omlettes and break
a few eggs and all that.

Change-Id: I0834d7bb16b2aecb2f63b58886eeda6ae4f29d59
</pre>
</div>
</content>
</entry>
<entry>
<title>Do some kernel cleanup</title>
<updated>2014-08-08T05:59:59+00:00</updated>
<author>
<name>Michael Sevakis</name>
<email>jethead71@rockbox.org</email>
</author>
<published>2014-08-08T05:39:29+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/rockbox/commit/?id=981d028c09d10ed867f2f955f58d60b753c64f29'/>
<id>981d028c09d10ed867f2f955f58d60b753c64f29</id>
<content type='text'>
* Seal away private thread and kernel definitions and declarations
into the internal headers in order to better hide internal structure.

* Add a thread-common.c file that keeps shared functions together.
List functions aren't messed with since that's about to be changed to
different ones.

* It is necessary to modify some ARM/PP stuff since GCC was complaining
about constant pool distance and I would rather not force dump it. Just
bl the cache calls in the startup and exit code and let it use veneers
if it must.

* Clean up redundant #includes in relevant areas and reorganize them.

* Expunge useless and dangerous stuff like remove_thread().

Change-Id: I6e22932fad61a9fac30fd1363c071074ee7ab382
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Seal away private thread and kernel definitions and declarations
into the internal headers in order to better hide internal structure.

* Add a thread-common.c file that keeps shared functions together.
List functions aren't messed with since that's about to be changed to
different ones.

* It is necessary to modify some ARM/PP stuff since GCC was complaining
about constant pool distance and I would rather not force dump it. Just
bl the cache calls in the startup and exit code and let it use veneers
if it must.

* Clean up redundant #includes in relevant areas and reorganize them.

* Expunge useless and dangerous stuff like remove_thread().

Change-Id: I6e22932fad61a9fac30fd1363c071074ee7ab382
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix some stuff for no priority and</title>
<updated>2014-08-06T06:27:49+00:00</updated>
<author>
<name>Michael Sevakis</name>
<email>jethead71@rockbox.org</email>
</author>
<published>2014-08-06T06:10:14+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/rockbox/commit/?id=81ffd9bfeee6aca65f507a46c8123b47ca6e2803'/>
<id>81ffd9bfeee6aca65f507a46c8123b47ca6e2803</id>
<content type='text'>
thread_queue_wake() doesn't need the 2nd parameter. The original purpose
for it never came to be.

Non priority version mrsw_writer_wakeup_readers was left improperly
finished. Get that back into line.

Change-Id: Ic613a2479f3cc14dc7c761517670eb15178da9f5
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
thread_queue_wake() doesn't need the 2nd parameter. The original purpose
for it never came to be.

Non priority version mrsw_writer_wakeup_readers was left improperly
finished. Get that back into line.

Change-Id: Ic613a2479f3cc14dc7c761517670eb15178da9f5
</pre>
</div>
</content>
</entry>
<entry>
<title>Add multi-reader, single-writer locks to kernel.</title>
<updated>2014-08-06T00:47:47+00:00</updated>
<author>
<name>Michael Sevakis</name>
<email>jethead71@rockbox.org</email>
</author>
<published>2014-04-24T08:09:18+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/rockbox/commit/?id=533d396761b630e372166f6f0522ba1c2d128d70'/>
<id>533d396761b630e372166f6f0522ba1c2d128d70</id>
<content type='text'>
Any number of readers may be in the critical section at a time and writers
are mutually exclusive to all other threads. They are a better choice when
data is rarely modified but often read and multiple threads can safely
access it for reading.

Priority inheritance is fully implemented along with other changes to the
kernel to fully support it on multiowner objects.

This also cleans up priority code in the kernel and updates some associated
structures in existing objects to the cleaner form.

Currently doesn't add the mrsw_lock.[ch] files since they're not yet
needed by anything but the supporting improvements are still useful.

This includes a typed bitarray API (bitarray.h) which is pretty basic
for now.

Change-Id: Idbe43dcd9170358e06d48d00f1c69728ff45b0e3
Reviewed-on: http://gerrit.rockbox.org/801
Reviewed-by: Michael Sevakis &lt;jethead71@rockbox.org&gt;
Tested: Michael Sevakis &lt;jethead71@rockbox.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Any number of readers may be in the critical section at a time and writers
are mutually exclusive to all other threads. They are a better choice when
data is rarely modified but often read and multiple threads can safely
access it for reading.

Priority inheritance is fully implemented along with other changes to the
kernel to fully support it on multiowner objects.

This also cleans up priority code in the kernel and updates some associated
structures in existing objects to the cleaner form.

Currently doesn't add the mrsw_lock.[ch] files since they're not yet
needed by anything but the supporting improvements are still useful.

This includes a typed bitarray API (bitarray.h) which is pretty basic
for now.

Change-Id: Idbe43dcd9170358e06d48d00f1c69728ff45b0e3
Reviewed-on: http://gerrit.rockbox.org/801
Reviewed-by: Michael Sevakis &lt;jethead71@rockbox.org&gt;
Tested: Michael Sevakis &lt;jethead71@rockbox.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>kernel: Break out kernel primitives into separate files and move to separate dir.</title>
<updated>2014-03-03T17:11:57+00:00</updated>
<author>
<name>Thomas Martitz</name>
<email>kugel@rockbox.org</email>
</author>
<published>2013-12-04T16:06:17+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/rockbox/commit/?id=382d1861af12741af4ff235b9d18f179c0adc4c5'/>
<id>382d1861af12741af4ff235b9d18f179c0adc4c5</id>
<content type='text'>
No code changed, just shuffling stuff around. This should make it easier to
build only select parts kernel and use different implementations.

Change-Id: Ie1f00f93008833ce38419d760afd70062c5e22b5
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
No code changed, just shuffling stuff around. This should make it easier to
build only select parts kernel and use different implementations.

Change-Id: Ie1f00f93008833ce38419d760afd70062c5e22b5
</pre>
</div>
</content>
</entry>
</feed>
