mirror of
https://github.com/drasko/codezero.git
synced 2026-05-01 08:01:31 +02:00
The very same fix we applied to the thread library but for posix this time.
This commit is contained in:
@@ -51,8 +51,7 @@ int find_and_set_first_free_contig_bits(u32 *word, unsigned int limit,
|
|||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
/* This is a state machine that checks n contiguous free bits. */
|
/* This is a state machine that checks n contiguous free bits. */
|
||||||
/* FIXME: It should be <= instead of <. Fix & test in a single patch */
|
while (i + nbits <= limit) {
|
||||||
while (i + nbits < limit) {
|
|
||||||
first = i;
|
first = i;
|
||||||
last = i;
|
last = i;
|
||||||
while (!(word[BITWISE_GETWORD(last)] & BITWISE_GETBIT(last))) {
|
while (!(word[BITWISE_GETWORD(last)] & BITWISE_GETBIT(last))) {
|
||||||
|
|||||||
Reference in New Issue
Block a user