OBJ += heap.o drvutil.o logging.o debug.o lib.o adt.o time.o
OBJ += messages.o modules.o syscalls.o system.o threads.o
OBJ += $(addprefix vfs/fs/, $(addsuffix .o,$(FILESYSTEMS)))
-OBJ += drv/vterm.o drv/proc.o drv/fifo.o drv/iocache.o drv/dma.o drv/pci.o drv/kb.o drv/vga.o
+OBJ += drv/kb.o drv/vterm.o drv/proc.o drv/fifo.o drv/iocache.o drv/dma.o drv/pci.o drv/vga.o
OBJ += binary.o bin/elf.o bin/pe.o
OBJ += vfs/main.o vfs/open.o vfs/acls.o vfs/dir.o vfs/io.o vfs/mount.o vfs/memfile.o vfs/nodecache.o
OBJ += vfs/fs/root.o vfs/fs/devfs.o
-BUILD_NUM = 221
+BUILD_NUM = 223
}
gaCPUs[i].IdleThread = Threads_GetThread(tid);
gaCPUs[i].IdleThread->ThreadName = "Idle Thread";
- Threads_SetTickets( gaCPUs[i].IdleThread, 0 ); // Never called randomly
+ Threads_SetPriority( gaCPUs[i].IdleThread, -1 ); // Never called randomly
gaCPUs[i].IdleThread->Quantum = 1; // 1 slice quantum
/**
* \brief Halt the CPU
*/
-#define HALT() __asm__ __volatile__ ("hlt")
+#define HALT() __asm__ __volatile__ ("sti;\n\thlt")
/**
* \brief Fire a magic breakpoint (bochs)
*/
// If the spinlock is set, let it complete
if(IS_LOCKED(&glThreadListLock)) return;
- //LogF("Scheduler: CPU = %i\n", CPU);
-
// Get current thread
thread = gaCPUs[CPU].Current;
);
#endif
+
+ if(CPU > MAX_CPUS)
+ LogF("CPU = %i", CPU);
// Set current thread
gaCPUs[CPU].Current = thread;
void Threads_Init(void);
int Threads_SetName(char *NewName);
char *Threads_GetName(int ID);
-void Threads_SetTickets(tThread *Thread, int Num);
+void Threads_SetPriority(tThread *Thread, int Pri);
tThread *Threads_CloneTCB(Uint *Err, Uint Flags);
int Threads_WaitTID(int TID, int *status);
tThread *Threads_GetThread(Uint TID);
// Bit 6 indicates the start of an entry\r
if(lfnInfo->id & 0x40) memset(lfn, 0, 256);\r
\r
- a = (lfnInfo->id & 0x3F) * 13;\r
+ a = ((lfnInfo->id & 0x3F) - 1) * 13;\r
+ //Log_Debug("FAT", "ID = 0x%02x, a = %i", lfnInfo->id, a);\r
\r
// Sanity Check (FAT implementations should not allow >255 character names)\r
if(a > 255) return VFS_SKIP;\r
lfn[a+ 9] = lfnInfo->name2[4]; lfn[a+10] = lfnInfo->name2[5];\r
lfn[a+11] = lfnInfo->name3[0]; lfn[a+12] = lfnInfo->name3[1];\r
LOG("lfn = '%s'", lfn);\r
+ //Log_Debug("FAT", "lfn = '%s'", lfn);\r
LEAVE('p', VFS_SKIP);\r
return VFS_SKIP;\r
}\r
\r
#if USE_LFN\r
lfn = FAT_int_GetLFN(Node, ID);\r
+ //Log_Debug("FAT", "lfn = %p'%s'", lfn, lfn);\r
ret = FAT_int_CreateName(&fileinfo[a], lfn);\r
#else\r
ret = FAT_int_CreateName(&fileinfo[a], NULL);\r