File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed
Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -13,11 +13,11 @@ extern PyType_Spec machine_id_lcg_spec;
1313void sort_machine_ids (uint16_t * machine_ids , size_t machine_ids_len );
1414bool has_machine_id_dupes (const uint16_t * machine_ids , size_t machine_ids_len );
1515
16- inline uint16_t machine_id_lcg (uint32_t x ) {
16+ static inline uint16_t machine_id_lcg (uint32_t x ) {
1717 return (32309 * x + 13799 ) % 65536 ;
1818}
1919
20- inline uint16_t machine_id_lcg_atomic (atomic_uint * x ) {
20+ static inline uint16_t machine_id_lcg_atomic (atomic_uint * x ) {
2121 uint32_t old , new ;
2222 do {
2323 old = atomic_load_explicit (x , memory_order_relaxed );
Original file line number Diff line number Diff line change @@ -25,16 +25,16 @@ const static struct timespec default_start_time = {
2525 .tv_nsec = 0
2626};
2727
28- inline sonyflake_time to_sonyflake_time (const struct timespec * ts ) {
28+ static inline sonyflake_time to_sonyflake_time (const struct timespec * ts ) {
2929 return ts -> tv_sec * 100 + ts -> tv_nsec / 10000000 ;
3030}
3131
32- inline void from_sonyflake_time (sonyflake_time sf_time , struct timespec * ts ) {
32+ static inline void from_sonyflake_time (sonyflake_time sf_time , struct timespec * ts ) {
3333 ts -> tv_sec = sf_time / 100 ;
3434 ts -> tv_nsec = (sf_time % 100 ) * 10000000 ;
3535}
3636
37- inline void sub_diff (struct timespec * a , const struct timespec * b ) {
37+ static inline void sub_diff (struct timespec * a , const struct timespec * b ) {
3838 a -> tv_sec -= b -> tv_sec ;
3939 a -> tv_nsec -= b -> tv_nsec ;
4040
@@ -44,7 +44,7 @@ inline void sub_diff(struct timespec *a, const struct timespec *b) {
4444 }
4545}
4646
47- inline uint64_t get_time_to_usleep (const struct timespec * diff ) {
47+ static inline uint64_t get_time_to_usleep (const struct timespec * diff ) {
4848 return diff -> tv_sec * 1000000 + diff -> tv_nsec / 1000 ;
4949}
5050
You can’t perform that action at this time.
0 commit comments