Skip to content

Commit

Permalink
Exposing Inscount to lua
Browse files Browse the repository at this point in the history
  • Loading branch information
Caesurus authored and lunixbochs committed Mar 19, 2019
1 parent faf5153 commit c26ba68
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions go/models/usercorn.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,5 +73,7 @@ type Usercorn interface {
AddKernel(kernel interface{}, first bool)
Syscall(num int, name string, getArgs SysGetArgs) (uint64, error)

Inscount() uint64

Exit(err error)
}
4 changes: 4 additions & 0 deletions go/usercorn.go
Original file line number Diff line number Diff line change
Expand Up @@ -813,6 +813,10 @@ func (u *Usercorn) Syscall(num int, name string, getArgs models.SysGetArgs) (uin
}
}

func (u *Usercorn) Inscount() uint64 {
return u.inscount
}

func (u *Usercorn) Exit(err error) {
u.exitStatus = err
u.Stop()
Expand Down

0 comments on commit c26ba68

Please sign in to comment.