Skip to content

Commit

Permalink
Fix include deadlock over CLOCK_TAI through milkDebugTools.h
Browse files Browse the repository at this point in the history
  • Loading branch information
DasVinch authored and AO RTS2 Dell T630 committed Sep 20, 2023
1 parent c74ab17 commit 7a13fa2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/CommandLineInterface/milkDebugTools.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ typedef int errno_t;
#endif

#include "CommandLineInterface/CLIcore/CLIcore_signals.h"
#include "CommandLineInterface/timeutils.h"

// error mode
// defines function behavior on error
Expand Down Expand Up @@ -227,7 +228,7 @@ typedef int errno_t;
abort(); \
} \
data.testpoint.line = __LINE__; \
clock_gettime(CLOCK_MILK, &data.testpoint.time); \
clock_gettime(CLOCK_MILK, &data.testpoint.time); \
} while (0)

/**
Expand Down
6 changes: 4 additions & 2 deletions src/CommandLineInterface/timeutils.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,19 @@
#ifndef _CLICORE_TIMEUTILS_H
#define _CLICORE_TIMEUTILS_H

#include "CommandLineInterface/CLIcore.h" // errno_t
//#include <errno.h> // errno_t

// holds "%04d-%02d-%02dT%02d:%02d:%02d.%09ldZ" + \0 + 1 char extra
#define TIMESTRINGLEN 32


// handles leap seconds better than CLOCK_REALTIME
#define CLOCK_MILK CLOCK_TAI
#define TZ_MILK_STR "HST" // Name of timezone to use in FITS headers.
#define TZ_MILK_UTC_OFF -36000.0 // Offset east of UTC in seconds for TZ_MILK_STR

// Don't move above #definitions, this an unresolved circular import of hell
#include "CommandLineInterface/CLIcore.h" // errno_t

errno_t milk_clock_gettime(struct timespec *tnow_p);

errno_t mkUTtimestring_nanosec(char *timestring, struct timespec tnow);
Expand Down

0 comments on commit 7a13fa2

Please sign in to comment.