mirror of
https://github.com/Fennix-Project/Kernel.git
synced 2025-05-28 15:34:33 +00:00
Replaced "__sync_synchronize" with "__sync"
This commit is contained in:
parent
0fb62e52d2
commit
419b5bee0d
@ -342,7 +342,7 @@ SafeFunction void UserModeExceptionHandler(CHArchTrapFrame *Frame)
|
|||||||
}
|
}
|
||||||
|
|
||||||
TaskManager->GetCurrentThread()->Status = Tasking::TaskStatus::Terminated;
|
TaskManager->GetCurrentThread()->Status = Tasking::TaskStatus::Terminated;
|
||||||
__sync_synchronize();
|
__sync;
|
||||||
error("End of report.");
|
error("End of report.");
|
||||||
CPU::Interrupts(CPU::Enable);
|
CPU::Interrupts(CPU::Enable);
|
||||||
debug("Interrupts enabled back.");
|
debug("Interrupts enabled back.");
|
||||||
|
@ -58,14 +58,14 @@ Retry:
|
|||||||
CPUData *CoreData = GetCurrentCPU();
|
CPUData *CoreData = GetCurrentCPU();
|
||||||
if (CoreData != nullptr)
|
if (CoreData != nullptr)
|
||||||
LockData.Core = CoreData->ID;
|
LockData.Core = CoreData->ID;
|
||||||
__sync_synchronize();
|
__sync;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int LockClass::Unlock()
|
int LockClass::Unlock()
|
||||||
{
|
{
|
||||||
__sync_synchronize();
|
__sync;
|
||||||
IsLocked.Store(false, MemoryOrder::Release);
|
IsLocked.Store(false, MemoryOrder::Release);
|
||||||
LockData.Count--;
|
LockData.Count--;
|
||||||
IsLocked = false;
|
IsLocked = false;
|
||||||
@ -117,7 +117,7 @@ Retry:
|
|||||||
CPUData *CoreData = GetCurrentCPU();
|
CPUData *CoreData = GetCurrentCPU();
|
||||||
if (CoreData != nullptr)
|
if (CoreData != nullptr)
|
||||||
LockData.Core = CoreData->ID;
|
LockData.Core = CoreData->ID;
|
||||||
__sync_synchronize();
|
__sync;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
#ifdef DEBUG_ALLOCATIONS
|
#ifdef DEBUG_ALLOCATIONS
|
||||||
#define memdbg(m, ...) \
|
#define memdbg(m, ...) \
|
||||||
debug(m, ##__VA_ARGS__); \
|
debug(m, ##__VA_ARGS__); \
|
||||||
__sync_synchronize()
|
__sync
|
||||||
#else
|
#else
|
||||||
#define memdbg(m, ...)
|
#define memdbg(m, ...)
|
||||||
#endif
|
#endif
|
||||||
|
@ -188,7 +188,7 @@ namespace Execute
|
|||||||
InterpreterTargetPath = new String(Path); /* We store in a String because Path may get changed while outside ELFLoad(). */
|
InterpreterTargetPath = new String(Path); /* We store in a String because Path may get changed while outside ELFLoad(). */
|
||||||
InterpreterMemoryImage = bl.MemoryImage;
|
InterpreterMemoryImage = bl.MemoryImage;
|
||||||
InterpreterNeededLibraries = bl.NeededLibraries;
|
InterpreterNeededLibraries = bl.NeededLibraries;
|
||||||
__sync_synchronize();
|
__sync;
|
||||||
TCB *InterpreterIPCThread = TaskManager->CreateThread(TaskManager->GetCurrentProcess(), (IP)ELFInterpreterThreadWrapper);
|
TCB *InterpreterIPCThread = TaskManager->CreateThread(TaskManager->GetCurrentProcess(), (IP)ELFInterpreterThreadWrapper);
|
||||||
InterpreterIPCThread->Rename("ELF Interpreter IPC Thread");
|
InterpreterIPCThread->Rename("ELF Interpreter IPC Thread");
|
||||||
InterpreterIPCThread->SetPriority(TaskPriority::Low);
|
InterpreterIPCThread->SetPriority(TaskPriority::Low);
|
||||||
|
@ -40,7 +40,7 @@ NewLock(SchedulerLock);
|
|||||||
|
|
||||||
#define schedbg(m, ...) \
|
#define schedbg(m, ...) \
|
||||||
debug(m, ##__VA_ARGS__); \
|
debug(m, ##__VA_ARGS__); \
|
||||||
__sync_synchronize()
|
__sync
|
||||||
#else
|
#else
|
||||||
#define schedbg(m, ...)
|
#define schedbg(m, ...)
|
||||||
#endif
|
#endif
|
||||||
@ -49,7 +49,7 @@ NewLock(SchedulerLock);
|
|||||||
#ifdef DEBUG_GET_NEXT_AVAILABLE_PROCESS
|
#ifdef DEBUG_GET_NEXT_AVAILABLE_PROCESS
|
||||||
#define gnap_schedbg(m, ...) \
|
#define gnap_schedbg(m, ...) \
|
||||||
debug(m, ##__VA_ARGS__); \
|
debug(m, ##__VA_ARGS__); \
|
||||||
__sync_synchronize()
|
__sync
|
||||||
#else
|
#else
|
||||||
#define gnap_schedbg(m, ...)
|
#define gnap_schedbg(m, ...)
|
||||||
#endif
|
#endif
|
||||||
@ -58,7 +58,7 @@ NewLock(SchedulerLock);
|
|||||||
#ifdef DEBUG_GET_NEXT_AVAILABLE_THREAD
|
#ifdef DEBUG_GET_NEXT_AVAILABLE_THREAD
|
||||||
#define gnat_schedbg(m, ...) \
|
#define gnat_schedbg(m, ...) \
|
||||||
debug(m, ##__VA_ARGS__); \
|
debug(m, ##__VA_ARGS__); \
|
||||||
__sync_synchronize()
|
__sync
|
||||||
#else
|
#else
|
||||||
#define gnat_schedbg(m, ...)
|
#define gnat_schedbg(m, ...)
|
||||||
#endif
|
#endif
|
||||||
@ -67,7 +67,7 @@ NewLock(SchedulerLock);
|
|||||||
#ifdef DEBUG_FIND_NEW_PROCESS
|
#ifdef DEBUG_FIND_NEW_PROCESS
|
||||||
#define fnp_schedbg(m, ...) \
|
#define fnp_schedbg(m, ...) \
|
||||||
debug(m, ##__VA_ARGS__); \
|
debug(m, ##__VA_ARGS__); \
|
||||||
__sync_synchronize()
|
__sync
|
||||||
#else
|
#else
|
||||||
#define fnp_schedbg(m, ...)
|
#define fnp_schedbg(m, ...)
|
||||||
#endif
|
#endif
|
||||||
@ -76,7 +76,7 @@ NewLock(SchedulerLock);
|
|||||||
#ifdef DEBUG_SCHEDULER_SEARCH_PROCESS_THREAD
|
#ifdef DEBUG_SCHEDULER_SEARCH_PROCESS_THREAD
|
||||||
#define sspt_schedbg(m, ...) \
|
#define sspt_schedbg(m, ...) \
|
||||||
debug(m, ##__VA_ARGS__); \
|
debug(m, ##__VA_ARGS__); \
|
||||||
__sync_synchronize()
|
__sync
|
||||||
#else
|
#else
|
||||||
#define sspt_schedbg(m, ...)
|
#define sspt_schedbg(m, ...)
|
||||||
#endif
|
#endif
|
||||||
@ -85,7 +85,7 @@ NewLock(SchedulerLock);
|
|||||||
#ifdef DEBUG_WAKE_UP_THREADS
|
#ifdef DEBUG_WAKE_UP_THREADS
|
||||||
#define wut_schedbg(m, ...) \
|
#define wut_schedbg(m, ...) \
|
||||||
debug(m, ##__VA_ARGS__); \
|
debug(m, ##__VA_ARGS__); \
|
||||||
__sync_synchronize()
|
__sync
|
||||||
#else
|
#else
|
||||||
#define wut_schedbg(m, ...)
|
#define wut_schedbg(m, ...)
|
||||||
#endif
|
#endif
|
||||||
@ -637,7 +637,7 @@ namespace Tasking
|
|||||||
/* RealEnd->[Function Exit] */
|
/* RealEnd->[Function Exit] */
|
||||||
RealEnd:
|
RealEnd:
|
||||||
this->SchedulerTicks.Store(CPU::Counter() - SchedTmpTicks);
|
this->SchedulerTicks.Store(CPU::Counter() - SchedTmpTicks);
|
||||||
__sync_synchronize(); /* TODO: Is this really needed? */
|
__sync; /* TODO: Is this really needed? */
|
||||||
}
|
}
|
||||||
|
|
||||||
SafeFunction __no_instrument_function void Task::OnInterruptReceived(CPU::x64::TrapFrame *Frame) { this->Schedule(Frame); }
|
SafeFunction __no_instrument_function void Task::OnInterruptReceived(CPU::x64::TrapFrame *Frame) { this->Schedule(Frame); }
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
#ifdef DEBUG_TASKING
|
#ifdef DEBUG_TASKING
|
||||||
#define tskdbg(m, ...) \
|
#define tskdbg(m, ...) \
|
||||||
debug(m, ##__VA_ARGS__); \
|
debug(m, ##__VA_ARGS__); \
|
||||||
__sync_synchronize()
|
__sync
|
||||||
#else
|
#else
|
||||||
#define tskdbg(m, ...)
|
#define tskdbg(m, ...)
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user