12#ifdef MANUX_TACHE_CONSOLE
20#include <manux/errno.h>
21#include <manux/string.h>
27#if defined(MANUX_TACHES) && defined(MANUX_EXCLUSION_MUTUELLE) && !defined(MANUX_REENTRANT)
45 __asm__ __volatile__ (
"ljmp * %0"::
"m" (*selecteur));
55void tacheExecuter(
void)
57#if defined(MANUX_TACHES) && defined(MANUX_EXCLUSION_MUTUELLE) && !defined(MANUX_REENTRANT)
60 assert(tacheDansLeNoyau == 0);
69#if defined(MANUX_TACHES) && defined(MANUX_EXCLUSION_MUTUELLE) && !defined(MANUX_REENTRANT)
77#if defined(MANUX_TACHES) && defined(MANUX_EXCLUSION_MUTUELLE) && !defined(MANUX_REENTRANT)
80 assert(tacheDansLeNoyau == 0);
97#if defined(MANUX_TACHES) && defined(MANUX_EXCLUSION_MUTUELLE) && !defined(MANUX_REENTRANT)
123 if (unePage ==
NULL) {
128 tache = (
Tache *) unePage;
151 tache->
tss.
CS = 0x08;
152 tache->
tss.
DS = 0x10;
153 tache->
tss.
ES = 0x10;
154 tache->
tss.
FS = 0x10;
155 tache->
tss.
GS = 0x10;
156 tache->
tss.
SS = 0x18;
180 tache->fichiers[i] =
NULL;
182 tache->nbFichiersOuverts = 0;
184# ifdef MANUX_HERITER_FICHIERS
192 tache->fichiers[i] = fichierDupliquer(
tacheEnCours->fichiers[i]);
195 tache->nbFichiersOuverts =
tacheEnCours->nbFichiersOuverts;
202#ifdef MANUX_TACHE_CONSOLE
207#if defined(MANUX_APPEL_SYSTEME) && defined(MANUX_AS_AUDIT)
209 nbAppelsSystemeIn[i] = 0;
210 nbAppelsSystemeOut[i] = 0;
223#ifdef MANUX_PAGINATION
258#ifdef MANUX_TACHE_CONSOLE
276#ifdef MANUX_TACHE_CONSOLE
282 tache->console = cons;
288 i = consoleCreerINoeud(cons);
291 tache->fichiers[0] = f;
303int tacheNumFichierLibre(
Tache * tache)
320int tacheAjouterFichiers(
Tache * tache,
int n,
Fichier * fichiers[],
int * fds)
333 for (
int i = 0; i < n; i++) {
334 fd = tacheNumFichierLibre(tache);
338 tache->fichiers[
fd] = fichiers[i];
339 tache->nbFichiersOuverts ++;
355 printkc(
" [ %d] %s %4d %2d:%2d 0x%x 0x%x 0x%x\n",
362#ifdef MANUX_TACHE_CONSOLE
377 printkc(
"\n ------------------------<SCHEDULER t = %d:%d (%d)>----------------------------\n",
383 printkc(
" [num] et nbAc tpsEx tache console ldt\n");
385 celluleTache !=
NULL;
386 celluleTache = celluleTache->
suivant){
389 printkc(
"\n------------------------------------------------------------------------------\n");
Définition des opérations de synchronisation de ManuX.
Définition des exlusions mutuelles.
void exclusionMutuelleEntrer(ExclusionMutuelle *em)
Entrée en exclusion mutuelle.
void exclusionMutuelleSortir(ExclusionMutuelle *em)
#define MANUX_TAILLE_PAGE
#define NB_MAX_APPELS_SYSTEME
Définition des fonctions de base d'accés à la console.
Console * consoleNoyau(void)
Obtention d'un pointeur sur la console par défaut.
Définition des fonctions de base d'entrée-sortie du noyau.
void insererCelluleTache(ListeTache *listeTaches, struct _Tache *tache, CelluleTache *celluleTache)
#define printk_debug(lvl, fmt, args...)
ListeTache listeTachesTerminees
: La liste des tâches achevées
ListeTache listeToutesLesTaches
: La liste de toutes les tâches existant sur le système.
Tache * tacheEnCours
: L'identification de la tâche en cours
void ordonnanceur(void)
Basculer vers la prochaine tache à exécuter.
int ajouterDescTSS(DescriptorTable *dt, void *adresse, uint32_t limite, booleen busyTask)
void chargerGDT(DescriptorTable *gdt)
DescriptorTable * gdtSysteme
struct _CelluleTache * suivant
: Qu'est-ce qu'un fichier ouvert du point de vue du noyau ?
: Un INoeud représente un fichier, d'un point de vue statique Il s'agit donc de la description d'un f...
: Définition du type décrivant une tache.
CorpsTache * fonctionPrincipale
uint16_t indiceTSSDescriptor
#define MANUX_NB_MAX_FICHIERS
void basculerVersTache(Tache *tache)
TacheID numeroProchaineTache
:Le numero de la prochaine tache (WARNING : et si on cycle ?)
void afficherEtatTaches(void)
Affichage des tâches.
unsigned int nbActivations
Tache * tacheCreer(CorpsTache corpsTache)
: Création d'une tâche.
void afficherEtatUneTache(Tache *tache)
Affichage de l'état d'une tâche à des fins de debug.
#define totalMinutesDansTemps(t)
#define secondesDansTemps(t)