def _generate_task_body(self, task):
      code = C.block(innerIndent=innerIndentDefault)
      isRunning=C.variable('isRunning', 'boolean')
      code.append(C.statement('{0} = TRUE'.format(str(isRunning))))
      code.append(C.statement('os_task_t *self = (os_task_t*)arg'))
      code.append('')
      code.append(C.line('if (self == 0)'))
      body = C.block(innerIndent=innerIndentDefault)
      body.append(C.statement('THREAD_RETURN(1)'))
      code.append(body)
      code.append('')
      code.append(C.line('while (isRunning == TRUE)'))