userspace: implement the Writer

Signed-off-by: David Scott <dave.scott@citrix.com>