explain the "brainfuck condition"

This commit is contained in:
Ludwig Ortmann 2013-10-28 12:54:16 +01:00
parent 5e6cc92291
commit f1b89df8d8

View File

@ -275,7 +275,7 @@ static int _msg_receive(msg_t *m, int block)
int msg_init_queue(msg_t *array, int num)
{
/* make sure brainfuck condition is met */
/* check if num is a power of two by comparing to its complement */
if (num && (num & (num - 1)) == 0) {
tcb_t *me = (tcb_t*) active_thread;
me->msg_array = array;