Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
robertdavidgraham committed Sep 11, 2013
1 parent 3216fe8 commit c5f5d33
Show file tree
Hide file tree
Showing 17 changed files with 2,055 additions and 2,050 deletions.
36 changes: 18 additions & 18 deletions src/event-timeout.h
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
#ifndef EVENT_TIMEOUT_H
#define EVENT_TIMEOUT_H
#include <stdint.h>

struct Timeouts;
struct TimeoutEntry;

struct TimeoutEvent {
void *p;
unsigned counter;
};


#ifndef EVENT_TIMEOUT_H
#define EVENT_TIMEOUT_H
#include <stdint.h>

struct Timeouts;
struct TimeoutEntry;

struct TimeoutEvent {
void *p;
unsigned counter;
};


struct Timeouts *timeouts_create(uint64_t timestamp);
unsigned *timeouts_add(struct Timeouts *timeouts, void *p, uint64_t timestamp, unsigned counter);
struct TimeoutEvent timeouts_remove(struct Timeouts *timeouts, uint64_t timestamp);

#define TICKS_FROM_SECS(secs) ((secs)*16384ULL)
#define TICKS_FROM_USECS(usecs) ((usecs)/16384ULL)
#define TICKS_FROM_TV(secs,usecs) (TICKS_FROM_SECS(secs)+TICKS_FROM_USECS(usecs))
#endif

#define TICKS_FROM_SECS(secs) ((secs)*16384ULL)
#define TICKS_FROM_USECS(usecs) ((usecs)/16384ULL)
#define TICKS_FROM_TV(secs,usecs) (TICKS_FROM_SECS(secs)+TICKS_FROM_USECS(usecs))
#endif
2 changes: 1 addition & 1 deletion src/logger.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
be redirected to a file.
*/
#include "logger.h"

#include "string_s.h"
#include <stdarg.h>
#include <stdio.h>

Expand Down
26 changes: 13 additions & 13 deletions src/packet-queue.h
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
#ifndef PACKET_QUEUE_H
#define PACKET_QUEUE_H
#include "rte-ring.h"
#include <limits.h>

typedef struct rte_ring PACKET_QUEUE;

struct PacketBuffer {
size_t length;
unsigned char px[2040];
};


#ifndef PACKET_QUEUE_H
#define PACKET_QUEUE_H
#include "rte-ring.h"
#include <limits.h>

typedef struct rte_ring PACKET_QUEUE;

struct PacketBuffer {
size_t length;
unsigned char px[2040];
};


#endif
Loading

0 comments on commit c5f5d33

Please sign in to comment.