Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correct types in declarations of Async Process calls #437

Merged
merged 1 commit into from
Aug 21, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions src/PAL/AsyncProcCall/AsyncCompletions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ void HAL_COMPLETION::Execute()

//--//

static const unsigned __int64 HAL_Completion_IdleValue = 0x0000FFFFFFFFFFFFull;
static const uint64_t HAL_Completion_IdleValue = 0x0000FFFFFFFFFFFFull;

void HAL_COMPLETION::InitializeList()
{
Expand Down Expand Up @@ -79,7 +79,7 @@ void HAL_COMPLETION::DequeueAndExec()

//--//

void HAL_COMPLETION::EnqueueTicks( unsigned __int64 eventTimeTicks )
void HAL_COMPLETION::EnqueueTicks( uint64_t eventTimeTicks )
{
NATIVE_PROFILE_PAL_ASYNC_PROC_CALL();
ASSERT(eventTimeTicks != 0);
Expand Down Expand Up @@ -109,21 +109,21 @@ void HAL_COMPLETION::EnqueueTicks( unsigned __int64 eventTimeTicks )
}

// the argument to enqueue is in miliseconds as we don't need anything bellow this in a reasonale use case scenario
void HAL_COMPLETION::EnqueueDelta64( unsigned __int64 miliSecondsFromNow )
void HAL_COMPLETION::EnqueueDelta64( uint64_t miliSecondsFromNow )
{
NATIVE_PROFILE_PAL_ASYNC_PROC_CALL();
// grab time first to be closest to now as possible from when this function was called
unsigned __int64 now = HAL_Time_CurrentSysTicks();
unsigned __int64 eventTimeTicks = CPU_MilisecondsToSysTicks( miliSecondsFromNow );
uint64_t now = HAL_Time_CurrentSysTicks();
uint64_t eventTimeTicks = CPU_MilisecondsToSysTicks( miliSecondsFromNow );

EnqueueTicks( now + eventTimeTicks );
}

// the argument to enqueue is in miliseconds as we don't need anything bellow this in a reasonale use case scenario
void HAL_COMPLETION::EnqueueDelta( unsigned int miliSecondsFromNow )
void HAL_COMPLETION::EnqueueDelta( uint32_t miliSecondsFromNow )
{
NATIVE_PROFILE_PAL_ASYNC_PROC_CALL();
EnqueueDelta64( (unsigned __int64)miliSecondsFromNow );
EnqueueDelta64( (uint64_t)miliSecondsFromNow );
}

//--//
Expand All @@ -143,7 +143,7 @@ void HAL_COMPLETION::Abort()

if(firstNode == this)
{
unsigned __int64 nextTicks;
uint64_t nextTicks;

if(g_HAL_Completion_List.IsEmpty())
{
Expand All @@ -167,7 +167,7 @@ void HAL_COMPLETION::Abort()

//--//

void HAL_COMPLETION::WaitForInterrupts( unsigned __int64 expire, unsigned int sleepLevel, unsigned __int64 wakeEvents )
void HAL_COMPLETION::WaitForInterrupts( uint64_t expire, uint32_t sleepLevel, uint64_t wakeEvents )
{
// TODO
// still unclear on the best way to handle this
Expand Down
6 changes: 3 additions & 3 deletions src/PAL/AsyncProcCall/Async_stubs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,12 @@ __nfweak void HAL_COMPLETION::Uninitialize()
NATIVE_PROFILE_PAL_ASYNC_PROC_CALL();
}

__nfweak void HAL_COMPLETION::EnqueueTicks( unsigned __int64 EventTimeTicks)
__nfweak void HAL_COMPLETION::EnqueueTicks( uint64_t EventTimeTicks)
{
NATIVE_PROFILE_PAL_ASYNC_PROC_CALL();
}

__nfweak void HAL_COMPLETION::EnqueueDelta( unsigned int uSecFromNow )
__nfweak void HAL_COMPLETION::EnqueueDelta( uint32_t uSecFromNow )
{
NATIVE_PROFILE_PAL_ASYNC_PROC_CALL();
}
Expand All @@ -84,7 +84,7 @@ __nfweak void HAL_COMPLETION::DequeueAndExec()
NATIVE_PROFILE_PAL_ASYNC_PROC_CALL();
}

__nfweak void HAL_COMPLETION::WaitForInterrupts( unsigned __int64 Expire, unsigned int sleepLevel, unsigned __int64 wakeEvents )
__nfweak void HAL_COMPLETION::WaitForInterrupts( uint64_t Expire, uint32_t sleepLevel, uint64_t wakeEvents )
{
NATIVE_PROFILE_PAL_ASYNC_PROC_CALL();
}
12 changes: 6 additions & 6 deletions src/PAL/Include/nanoPAL_AsyncProcCalls_decl.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,11 @@ struct HAL_CONTINUATION : public HAL_DblLinkedNode<HAL_CONTINUATION>

struct HAL_COMPLETION : public HAL_CONTINUATION
{
unsigned __int64 EventTimeTicks;
uint64_t EventTimeTicks;
bool ExecuteInISR;

#if defined(_DEBUG)
unsigned __int64 Start_RTC_Ticks;
uint64_t Start_RTC_Ticks;
#endif

void InitializeForISR( HAL_CALLBACK_FPN EntryPoint, void* Argument = NULL )
Expand All @@ -111,9 +111,9 @@ struct HAL_COMPLETION : public HAL_CONTINUATION
InitializeCallback( EntryPoint, Argument );
}

void EnqueueTicks ( unsigned __int64 eventTimeTicks );
void EnqueueDelta64 ( unsigned __int64 miliSecondsFromNow );
void EnqueueDelta ( unsigned int miliSecondsFromNow );
void EnqueueTicks ( uint64_t eventTimeTicks );
void EnqueueDelta64 ( uint64_t miliSecondsFromNow );
void EnqueueDelta ( uint32_t miliSecondsFromNow );

void Abort();

Expand All @@ -127,7 +127,7 @@ struct HAL_COMPLETION : public HAL_CONTINUATION

static void DequeueAndExec();

static void WaitForInterrupts( unsigned __int64 expire, unsigned int sleepLevel, unsigned __int64 wakeEvents );
static void WaitForInterrupts( uint64_t expire, uint32_t sleepLevel, uint64_t wakeEvents );
};

//--//
Expand Down