tests: add 'postk_master' branch tests
Change-Id: Ie0d4cfd0921aed89d2db6083c9eb068b1cfc1984
This commit is contained in:
29
test/uti/mpi/fwq.h
Normal file
29
test/uti/mpi/fwq.h
Normal file
@@ -0,0 +1,29 @@
|
||||
#ifndef __FWQ_H_INCLUDED__
|
||||
#define __FWQ_H_INCLUDED__
|
||||
|
||||
static inline void fixed_size_work(void)
|
||||
{
|
||||
asm volatile(
|
||||
"movq $0, %%rcx\n\t"
|
||||
"1:\t"
|
||||
"addq $1, %%rcx\n\t"
|
||||
"cmpq $99, %%rcx\n\t"
|
||||
"jle 1b\n\t"
|
||||
:
|
||||
:
|
||||
: "rcx", "cc");
|
||||
}
|
||||
|
||||
static inline void bulk_fsw(unsigned long n)
|
||||
{
|
||||
int j;
|
||||
|
||||
for (j = 0; j < (n); j++) {
|
||||
fixed_size_work();
|
||||
}
|
||||
}
|
||||
|
||||
void fwq_init(void);
|
||||
void fwq(long delay_nsec);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user