mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
add comments to #endif's
This commit is contained in:
parent
5c8c1ad59d
commit
2881bd8b73
4 changed files with 11 additions and 12 deletions
|
@ -249,7 +249,7 @@ AFILE * afopen(const char *uri, const char *mode)
|
|||
#if LIBCURL_VERSION_NUM >= 0x072000
|
||||
curl_easy_setopt(af->curl, CURLOPT_XFERINFOFUNCTION, advio_xferinfo);
|
||||
curl_easy_setopt(af->curl, CURLOPT_XFERINFODATA, af);
|
||||
#endif
|
||||
#endif /* LIBCURL_VERSION_NUM >= 0x072000 */
|
||||
|
||||
ret = adownload(af, 0);
|
||||
if (ret)
|
||||
|
|
|
@ -65,7 +65,7 @@ static int json_dumpfd_callback(const char *buffer, size_t size, void *data)
|
|||
|
||||
if (write(*dest, buffer, size) == (ssize_t)size)
|
||||
return 0;
|
||||
#endif
|
||||
#endif /* HAVE_UNISTD_H */
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
@ -74,4 +74,4 @@ int json_dumpfd(const json_t *json, int output, size_t flags)
|
|||
{
|
||||
return json_dump_callback(json, json_dumpfd_callback, (void *) &output, flags);
|
||||
}
|
||||
#endif
|
||||
#endif /* JANSSON_VERSION_HEX < 0x020A00 */
|
||||
|
|
|
@ -69,7 +69,7 @@ void init(int priority, int affinity)
|
|||
|
||||
(void) affinity;
|
||||
(void) priority;
|
||||
#endif
|
||||
#endif /* __linux__ */
|
||||
}
|
||||
|
||||
#ifdef __linux__
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
|
||||
#if PERIODIC_TASK_IMPL == TIMERFD
|
||||
#include <sys/timerfd.h>
|
||||
#endif
|
||||
#endif /* PERIODIC_TASK_IMPL */
|
||||
|
||||
int task_init(struct task *t, double rate, int clock)
|
||||
{
|
||||
|
@ -46,7 +46,7 @@ int task_init(struct task *t, double rate, int clock)
|
|||
ret = tsc_init(&t->tsc);
|
||||
if (ret)
|
||||
return ret;
|
||||
#endif
|
||||
#endif /* PERIODIC_TASK_IMPL */
|
||||
|
||||
ret = task_set_rate(t, rate);
|
||||
if (ret)
|
||||
|
@ -70,8 +70,7 @@ int task_set_timeout(struct task *t, double to)
|
|||
int task_set_next(struct task *t, struct timespec *next)
|
||||
{
|
||||
|
||||
#if PERIODIC_TASK_IMPL == RDTSC
|
||||
#else
|
||||
#if PERIODIC_TASK_IMPL != RDTSC
|
||||
t->next = *next;
|
||||
|
||||
#if PERIODIC_TASK_IMPL == TIMERFD
|
||||
|
@ -84,8 +83,8 @@ int task_set_next(struct task *t, struct timespec *next)
|
|||
ret = timerfd_settime(t->fd, TFD_TIMER_ABSTIME, &its, NULL);
|
||||
if (ret)
|
||||
return ret;
|
||||
#endif
|
||||
#endif
|
||||
#endif /* PERIODIC_TASK_IMPL == TIMERFD */
|
||||
#endif /* PERIODIC_TASK_IMPL != RDTSC */
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -117,8 +116,8 @@ int task_set_rate(struct task *t, double rate)
|
|||
ret = timerfd_settime(t->fd, 0, &its, NULL);
|
||||
if (ret)
|
||||
return ret;
|
||||
#endif
|
||||
#endif
|
||||
#endif /* PERIODIC_TASK_IMPL */
|
||||
#endif /* PERIODIC_TASK_IMPL == RDTSC */
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue