Changeset fd8302d in mainline
- Timestamp:
- 2006-05-28T22:26:00Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- a449065
- Parents:
- a6cb8cb
- Location:
- generic
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
generic/include/print.h
ra6cb8cb rfd8302d 39 39 #define EOF (-1) 40 40 41 extern int puts(const char * str);42 43 41 extern int printf(const char *fmt, ...); 44 42 extern int sprintf(char *str, const char *fmt, ...); -
generic/src/time/clock.c
ra6cb8cb rfd8302d 54 54 /* Pointers to public variables with time */ 55 55 struct ptime { 56 __native seconds ;56 __native seconds1; 57 57 __native useconds; 58 __native useconds2;58 __native seconds2; 59 59 }; 60 60 struct ptime *public_time; … … 83 83 84 84 /* TODO: We would need some arch dependent settings here */ 85 public_time->seconds = 0; 85 public_time->seconds1 = 0; 86 public_time->seconds2 = 0; 86 87 public_time->useconds = 0; 87 88 … … 100 101 secfrag += 1000000/HZ; 101 102 if (secfrag >= 1000000) { 102 public_time->useconds = 0; 103 secfrag -= 1000000; 104 public_time->seconds1++; 103 105 write_barrier(); 104 public_time->seconds++; 105 secfrag = 0; 106 public_time->useconds = secfrag; 107 write_barrier(); 108 public_time->seconds2 = public_time->seconds1; 106 109 } else 107 110 public_time->useconds += 1000000/HZ; 108 write_barrier();109 public_time->useconds2 = public_time->useconds;110 write_barrier();111 111 } 112 112 }
Note:
See TracChangeset
for help on using the changeset viewer.