1
0
Fork 0
mirror of https://github.com/hermitcore/libhermit.git synced 2025-03-09 00:00:03 +01:00

kernel/tasks: initialize FPU state to get rid off warnings

This commit is contained in:
daniel-k 2016-09-02 17:51:54 +02:00
parent fa9ba43009
commit a1f55c3793
2 changed files with 6 additions and 2 deletions

View file

@ -56,6 +56,8 @@ typedef struct {
uint32_t status;
} i387_fsave_t;
#define FPU_STATE_INIT { {0, 0, 0, 0, 0, 0, 0, { [0 ... 19] = 0 }, 0} }
typedef struct {
uint16_t cwd;
uint16_t swd;

View file

@ -54,8 +54,8 @@ extern atomic_int32_t cpu_online;
* A task's id will be its position in this array.
*/
static task_t task_table[MAX_TASKS] = { \
[0] = {0, TASK_IDLE, 0, NULL, NULL, NULL, TASK_DEFAULT_FLAGS, 0, 0, 0, NULL, 0, NULL, NULL, 0, 0, 0}, \
[1 ... MAX_TASKS-1] = {0, TASK_INVALID, 0, NULL, NULL, NULL, TASK_DEFAULT_FLAGS, 0, 0, 0, NULL, 0, NULL, NULL, 0, 0, 0}};
[0] = {0, TASK_IDLE, 0, NULL, NULL, NULL, TASK_DEFAULT_FLAGS, 0, 0, 0, NULL, 0, NULL, NULL, 0, 0, 0, NULL, FPU_STATE_INIT}, \
[1 ... MAX_TASKS-1] = {0, TASK_INVALID, 0, NULL, NULL, NULL, TASK_DEFAULT_FLAGS, 0, 0, 0, NULL, 0, NULL, NULL, 0, 0, 0, NULL, FPU_STATE_INIT}};
static spinlock_irqsave_t table_lock = SPINLOCK_IRQSAVE_INIT;
@ -239,6 +239,8 @@ int multitasking_init(void)
/* interrupt handler to save / restore the FPU context */
void fpu_handler(struct state *s)
{
(void) s;
task_t* task = per_core(current_task);
uint32_t core_id = CORE_ID;