Changeset 99
- Timestamp:
- 03/23/08 16:08:32 (10 months ago)
- Location:
- Whitix/trunk/kernel
- Files:
-
- 3 modified
Legend:
- Unmodified
- Added
- Removed
-
Whitix/trunk/kernel/load.c
r25 r99 19 19 #include <fs/vfs.h> 20 20 #include <i386/i386.h> 21 #include <net/socket.h> 21 22 #include <string.h> 22 23 #include <vmm.h> … … 262 263 ***********************************************************************/ 263 264 265 /* TODO: Move to generic load file. */ 266 264 267 static int ExecSetupFs(struct Process* process,char* pathName,int* fds) 265 268 { … … 270 273 271 274 process->files=(struct File*)malloc(sizeof(struct File)*MAX_FILES); 275 process->sockets=(struct Socket**)malloc(sizeof(struct Socket*)*MAX_FILES); 272 276 process->root=current->root; 273 277 current->root->refs++; -
Whitix/trunk/kernel/main.c
r61 r99 28 28 #include <typedefs.h> 29 29 #include <fs/vfs.h> 30 #include <net/network.h> 30 31 #include <fs/devfs.h> 31 32 #include <init.h> … … 167 168 VfsInit(); 168 169 TimeInit(); 170 NetworkInit(); 169 171 170 172 start=ThrCreateProcess("KernelLoading"); -
Whitix/trunk/kernel/sched.c
r51 r99 29 29 #include <vmm.h> 30 30 #include <user_acc.h> 31 #include <net/socket.h> 31 32 32 33 /* List heads */ … … 253 254 ret->refs=1; 254 255 ret->priority=PRIORITY_DEFAULT; 256 ret->state=THR_PAUSED; 255 257 ThrArchCreateThread(ret,entry,user,stackP); 256 258 … … 454 456 DoCloseFile(¤t->files[i]); 455 457 458 if (current->sockets) 459 for (i=0; i<MAX_FILES; i++) 460 SocketClose(current->sockets[i]); 461 456 462 /* Does not apply to the KernelLoading process */ 457 463 if (current->exec) … … 462 468 463 469 free(current->files); 470 free(current->sockets); 464 471 free(current->sCwd); 465 472 } … … 480 487 { 481 488 struct Thread* curr,*curr2; 482 483 // printf("ThrProcessExit(%#X,%d)\n",current,returnCode);484 489 485 490 SpinLockIrq(&procListLock); … … 690 695 { 691 696 struct Thread* thread=ThrCreateThread(current,address,true,stackP); 697 692 698 if (!thread) 693 699 return -ENOMEM;