mirror of
https://github.com/amadvance/snapraid.git
synced 2026-12-05 06:10:13 -05:00
Rework the portable support
This commit is contained in:
parent
34fc79464b
commit
b3879f7f8e
9 changed files with 139 additions and 128 deletions
|
|
@ -171,7 +171,7 @@ void state_init(struct snapraid_state* state)
|
|||
state->tick_sched = 0;
|
||||
state->tick_raid = 0;
|
||||
state->tick_hash = 0;
|
||||
state->tick_last = tick();
|
||||
state->tick_last = os_tick();
|
||||
state->share[0] = 0;
|
||||
state->pool[0] = 0;
|
||||
state->pool_device = 0;
|
||||
|
|
@ -4224,7 +4224,7 @@ static void* state_verify_thread(void* arg)
|
|||
uint32_t crc_computed;
|
||||
uint64_t start;
|
||||
|
||||
start = tick_ms();
|
||||
start = os_tick_ms();
|
||||
|
||||
if (sdeplete(f, buf) != 0) {
|
||||
/* LCOV_EXCL_START */
|
||||
|
|
@ -4256,7 +4256,7 @@ static void* state_verify_thread(void* arg)
|
|||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
|
||||
msg_progress("Verified %s in %" PRIu64 " seconds\n", content->content, (tick_ms() - start) / 1000);
|
||||
msg_progress("Verified %s in %" PRIu64 " seconds\n", content->content, (os_tick_ms() - start) / 1000);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -4652,7 +4652,7 @@ void state_progress_restart(struct snapraid_state* state)
|
|||
}
|
||||
|
||||
/**
|
||||
* Set the latest tick data in the progress vector.
|
||||
* Set the latest os_tick data in the progress vector.
|
||||
*/
|
||||
static void state_progress_latest(struct snapraid_state* state)
|
||||
{
|
||||
|
|
@ -5118,14 +5118,14 @@ int state_progress(struct snapraid_state* state, struct snapraid_io* io, block_o
|
|||
|
||||
void state_usage_waste(struct snapraid_state* state)
|
||||
{
|
||||
uint64_t now = tick();
|
||||
uint64_t now = os_tick();
|
||||
|
||||
state->tick_last = now;
|
||||
}
|
||||
|
||||
void state_usage_misc(struct snapraid_state* state)
|
||||
{
|
||||
uint64_t now = tick();
|
||||
uint64_t now = os_tick();
|
||||
uint64_t delta = now - state->tick_last;
|
||||
|
||||
/* increment the time spent in computations */
|
||||
|
|
@ -5136,7 +5136,7 @@ void state_usage_misc(struct snapraid_state* state)
|
|||
|
||||
void state_usage_sched(struct snapraid_state* state)
|
||||
{
|
||||
uint64_t now = tick();
|
||||
uint64_t now = os_tick();
|
||||
uint64_t delta = now - state->tick_last;
|
||||
|
||||
/* increment the time spent in computations */
|
||||
|
|
@ -5147,7 +5147,7 @@ void state_usage_sched(struct snapraid_state* state)
|
|||
|
||||
void state_usage_raid(struct snapraid_state* state)
|
||||
{
|
||||
uint64_t now = tick();
|
||||
uint64_t now = os_tick();
|
||||
uint64_t delta = now - state->tick_last;
|
||||
|
||||
/* increment the time spent in computations */
|
||||
|
|
@ -5158,7 +5158,7 @@ void state_usage_raid(struct snapraid_state* state)
|
|||
|
||||
void state_usage_hash(struct snapraid_state* state)
|
||||
{
|
||||
uint64_t now = tick();
|
||||
uint64_t now = os_tick();
|
||||
uint64_t delta = now - state->tick_last;
|
||||
|
||||
/* increment the time spent in computations */
|
||||
|
|
@ -5176,7 +5176,7 @@ void state_usage_file(struct snapraid_state* state, struct snapraid_disk* disk,
|
|||
|
||||
void state_usage_disk(struct snapraid_state* state, struct snapraid_handle* handle_map, unsigned* waiting_map, unsigned waiting_mac)
|
||||
{
|
||||
uint64_t now = tick();
|
||||
uint64_t now = os_tick();
|
||||
uint64_t delta = now - state->tick_last;
|
||||
unsigned i;
|
||||
|
||||
|
|
@ -5196,7 +5196,7 @@ void state_usage_disk(struct snapraid_state* state, struct snapraid_handle* hand
|
|||
|
||||
void state_usage_parity(struct snapraid_state* state, unsigned* waiting_map, unsigned waiting_mac)
|
||||
{
|
||||
uint64_t now = tick();
|
||||
uint64_t now = os_tick();
|
||||
uint64_t delta = now - state->tick_last;
|
||||
unsigned i;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue