Skip to content

Commit

Permalink
[core.counter] Move struct counter to core/counter.h.
Browse files Browse the repository at this point in the history
  • Loading branch information
eugeneia committed Jul 9, 2015
1 parent 7063865 commit b2cc0fa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/core/counter.h
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
struct counter { uint64_t c; };
4 changes: 3 additions & 1 deletion src/core/counter.lua
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ module(..., package.seeall)

local shm = require("core.shm")
local ffi = require("ffi")
local counter_t = ffi.typeof("struct { uint64_t c; }")
require("core.counter_h")

local counter_t = ffi.typeof("struct counter")

function open (name) return shm.map(name, counter_t) end
function set (counter, value) counter.c = value end
Expand Down

0 comments on commit b2cc0fa

Please sign in to comment.