Skip to content
This repository has been archived by the owner on Sep 19, 2022. It is now read-only.

Commit

Permalink
format and small todos
Browse files Browse the repository at this point in the history
  • Loading branch information
specialfish9 committed Jul 17, 2022
1 parent cec10c6 commit 5bba819
Show file tree
Hide file tree
Showing 8 changed files with 222 additions and 183 deletions.
12 changes: 6 additions & 6 deletions src/init_proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
#include "init_proc.h"
#include "pandos_const.h"
#include "pandos_types.h"
#include "sys_support.h"
#include "syscalls.h"
#include "utils.h"
#include "sys_support.h"
#include "vm_support.h"
#include <umps3/umps/cp0.h>
#include <umps3/umps/libumps.h>
Expand All @@ -31,13 +31,12 @@ extern void support_exec_handler(void);
static int semaforo_a_cazzo = 0;

/**
* @brief Inizializza una tabella delle pagine privata
* @brief Inizializza una tabella delle pagine privata
* @param tbl la tabella da inizializzare
* @param asid l'ASID del processo proprietario della tabella
* */
static void init_page_table(pteEntry_t *tbl, const int asid);


inline void instantiator_proc(void)
{
state_t tp_states[UPROCMAX];
Expand All @@ -57,7 +56,8 @@ inline void instantiator_proc(void)
tp_states[i - 1].reg_sp = USERSTACKTOP;

/* Timer enabled, interrupts enabled and usermode */
tp_states[i - 1].status = STATUS_TE | STATUS_IEc | STATUS_KUc | STATUS_IM_MASK ;
tp_states[i - 1].status =
STATUS_TE | STATUS_IEc | STATUS_KUc | STATUS_IM_MASK;
/*for (int j = 0; j < 8; j ++) {
tp_states[i].status |= STATUS_IM_BIT(j);
}*/
Expand All @@ -81,10 +81,10 @@ inline void instantiator_proc(void)

SYSCALL(CREATEPROCESS, (unsigned int)&tp_states[i - 1], PROCESS_PRIO_LOW,
(unsigned int)&tp_supps[i - 1]);
logi(LOG, "created uproc ", i );
logi(LOG, "created uproc ", i);
}

for (i = 0; i < 1/*UPROCMAX*/; i++)
for (i = 0; i < 1 /*UPROCMAX*/; i++)
SYSCALL(PASSEREN, (unsigned int)&semaforo_a_cazzo, 0, 0);
}

Expand Down
2 changes: 1 addition & 1 deletion src/kernel.c
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ void uTLB_RefillHandler(void)
setENTRYHI(missing_entry.pte_entryHI);
setENTRYLO(missing_entry.pte_entryLO);
TLBWR();

/* 3) Ritorna il controllo al processo corrente per riprovare il processo
* di traduzione dell'indirizzo */
enqueue_proc(act_proc, act_proc->p_prio);
Expand Down
1 change: 0 additions & 1 deletion src/pandos_const.h
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@
#define OKCHARTRANS 5
#define TRANSMITCHAR 2


#define SEEKTOCYL 2
#define DISKREAD 3
#define DISKWRITE 4
Expand Down
Loading

0 comments on commit 5bba819

Please sign in to comment.