diff --git a/sys/amd64/include/counter.h b/sys/amd64/include/counter.h index 2255a0575a0c..b09790fcb34e 100644 --- a/sys/amd64/include/counter.h +++ b/sys/amd64/include/counter.h @@ -83,11 +83,18 @@ counter_u64_zero_inline(counter_u64_t c) static inline void counter_u64_add(counter_u64_t c, int64_t inc) { - + int64_t *p; +#ifdef notyet __asm __volatile("addq\t%1,%%gs:(%0)" : : "r" ((char *)c - (char *)&__pcpu[0]), "ri" (inc) : "memory", "cc"); +#endif + /* temporary */ + critical_enter(); + p = zpcpu_get(c); + *p += inc; + critical_exit(); } #endif /* ! __MACHINE_COUNTER_H__ */