diff options
author | Stefan Metzmacher <metze@samba.org> | 2008-12-29 17:48:35 +0100 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2008-12-29 19:57:07 +0100 |
commit | af29b82536ef678e6a1817aa11be8c363253b305 (patch) | |
tree | 22c3d4ad4959caa56fd134fc8c08efde8e6047e1 | |
parent | 635a973be56e484312f336298bc17372075b307f (diff) | |
download | samba-af29b82536ef678e6a1817aa11be8c363253b305.tar.gz |
s4:pvfs_aio: use tevent
metze
-rw-r--r-- | source4/ntvfs/posix/config.mk | 2 | ||||
-rw-r--r-- | source4/ntvfs/posix/pvfs_aio.c | 22 |
2 files changed, 12 insertions, 12 deletions
diff --git a/source4/ntvfs/posix/config.mk b/source4/ntvfs/posix/config.mk index b38efba79ba..ec1cdf3659b 100644 --- a/source4/ntvfs/posix/config.mk +++ b/source4/ntvfs/posix/config.mk @@ -29,7 +29,7 @@ pvfs_acl_nfs4_OBJ_FILES = $(ntvfssrcdir)/posix/pvfs_acl_nfs4.o ################################################ [SUBSYSTEM::pvfs_aio] -PRIVATE_DEPENDENCIES = LIBEVENTS LIBAIO_LINUX +PRIVATE_DEPENDENCIES = LIBTEVENT LIBAIO_LINUX ################################################ pvfs_aio_OBJ_FILES = $(ntvfssrcdir)/posix/pvfs_aio.o diff --git a/source4/ntvfs/posix/pvfs_aio.c b/source4/ntvfs/posix/pvfs_aio.c index 2a10b03fdab..7a090e214a9 100644 --- a/source4/ntvfs/posix/pvfs_aio.c +++ b/source4/ntvfs/posix/pvfs_aio.c @@ -20,28 +20,28 @@ */ #include "includes.h" +#include <tevent.h> #include "vfs_posix.h" -#include "lib/events/events.h" #include "system/aio.h" struct pvfs_aio_read_state { struct ntvfs_request *req; union smb_read *rd; struct pvfs_file *f; - struct aio_event *ae; + struct tevent_aio *ae; }; struct pvfs_aio_write_state { struct ntvfs_request *req; union smb_write *wr; struct pvfs_file *f; - struct aio_event *ae; + struct tevent_aio *ae; }; /* called when an aio read has finished */ -static void pvfs_aio_read_handler(struct event_context *ev, struct aio_event *ae, +static void pvfs_aio_read_handler(struct tevent_context *ev, struct tevent_aio *ae, int ret, void *private) { struct pvfs_aio_read_state *state = talloc_get_type(private, @@ -83,10 +83,10 @@ NTSTATUS pvfs_aio_pread(struct ntvfs_request *req, union smb_read *rd, io_prep_pread(&iocb, f->handle->fd, rd->readx.out.data, maxcnt, rd->readx.in.offset); - state->ae = event_add_aio(req->ctx->event_ctx, req->ctx->event_ctx, &iocb, - pvfs_aio_read_handler, state); + state->ae = tevent_add_aio(req->ctx->event_ctx, req->ctx->event_ctx, &iocb, + pvfs_aio_read_handler, state); if (state->ae == NULL) { - DEBUG(0,("Failed event_add_aio\n")); + DEBUG(0,("Failed tevent_add_aio\n")); talloc_free(state); return NT_STATUS_NOT_IMPLEMENTED; } @@ -106,7 +106,7 @@ NTSTATUS pvfs_aio_pread(struct ntvfs_request *req, union smb_read *rd, /* called when an aio write has finished */ -static void pvfs_aio_write_handler(struct event_context *ev, struct aio_event *ae, +static void pvfs_aio_write_handler(struct tevent_context *ev, struct tevent_aio *ae, int ret, void *private) { struct pvfs_aio_write_state *state = talloc_get_type(private, @@ -147,10 +147,10 @@ NTSTATUS pvfs_aio_pwrite(struct ntvfs_request *req, union smb_write *wr, io_prep_pwrite(&iocb, f->handle->fd, wr->writex.in.data, wr->writex.in.count, wr->writex.in.offset); - state->ae = event_add_aio(req->ctx->event_ctx, req->ctx->event_ctx, &iocb, - pvfs_aio_write_handler, state); + state->ae = tevent_add_aio(req->ctx->event_ctx, req->ctx->event_ctx, &iocb, + pvfs_aio_write_handler, state); if (state->ae == NULL) { - DEBUG(0,("Failed event_add_aio\n")); + DEBUG(0,("Failed tevent_add_aio\n")); talloc_free(state); return NT_STATUS_NOT_IMPLEMENTED; } |