kernel/eka/kernel/sexec.cpp
changeset 259 57b9594f5772
parent 201 43365a9b78a3
equal deleted inserted replaced
247:d8d70de2bd36 259:57b9594f5772
  2221 	{
  2221 	{
  2222 
  2222 
  2223 	__KTRACE_OPT(KBOOT,Kern::Printf("File server thread registered"));
  2223 	__KTRACE_OPT(KBOOT,Kern::Printf("File server thread registered"));
  2224 	DThread* pT = TheCurrentThread;
  2224 	DThread* pT = TheCurrentThread;
  2225 	DProcess* pP = pT->iOwningProcess;
  2225 	DProcess* pP = pT->iOwningProcess;
       
  2226 	if (K::TheFileServerProcess && K::TheFileServerProcess!=pP)
       
  2227 		K::PanicCurrentThread(EAccessDenied);
  2226 	pP->iFlags |= (KThreadFlagProcessCritical | KProcessFlagSystemPermanent);
  2228 	pP->iFlags |= (KThreadFlagProcessCritical | KProcessFlagSystemPermanent);
  2227 	pT->iFlags |= KThreadFlagSystemPermanent;
  2229 	pT->iFlags |= KThreadFlagSystemPermanent;
  2228 	if (K::TheFileServerProcess && K::TheFileServerProcess!=pP)
       
  2229 		K::PanicCurrentThread(EAccessDenied);
       
  2230 	K::TheFileServerProcess=pP;
  2230 	K::TheFileServerProcess=pP;
  2231 	K::ThreadEnterCS();
  2231 	K::ThreadEnterCS();
  2232 	pP->SetPriority(EPriorityFileServer);
  2232 	pP->SetPriority(EPriorityFileServer);
  2233 	M::FsRegisterThread();
  2233 	M::FsRegisterThread();
  2234 	K::ThreadLeaveCS();
  2234 	K::ThreadLeaveCS();