trace.c: do not mark getnanotime() as "inline"
Oracle Studio compilers don't allow for static variables in functions that are defined to be inline. GNU C does permit this. Let's reference the C99 standard though, which doesn't allow for inline functions to contain modifiable static variables. Signed-off-by: Ben Walton <bdwalton@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
62b553cdd6
commit
6433d56975
2
trace.c
2
trace.c
@@ -384,7 +384,7 @@ static inline uint64_t gettimeofday_nanos(void)
|
|||||||
* Returns nanoseconds since the epoch (01/01/1970), for performance tracing
|
* Returns nanoseconds since the epoch (01/01/1970), for performance tracing
|
||||||
* (i.e. favoring high precision over wall clock time accuracy).
|
* (i.e. favoring high precision over wall clock time accuracy).
|
||||||
*/
|
*/
|
||||||
inline uint64_t getnanotime(void)
|
uint64_t getnanotime(void)
|
||||||
{
|
{
|
||||||
static uint64_t offset;
|
static uint64_t offset;
|
||||||
if (offset > 1) {
|
if (offset > 1) {
|
||||||
|
|||||||
Reference in New Issue
Block a user