X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lnet%2Fulnds%2Fdispatch.h;fp=lnet%2Fulnds%2Fdispatch.h;h=34dd0701b65688ceae15b47c185defac8c81a7a0;hb=96ec6856f91f7f9031cfce4273c714d72cfe59ae;hp=0000000000000000000000000000000000000000;hpb=0bcac33c5aec463e9f471fba6f7d0adc26e6df9f;p=fs%2Flustre-release.git diff --git a/lnet/ulnds/dispatch.h b/lnet/ulnds/dispatch.h new file mode 100644 index 0000000..34dd070 --- /dev/null +++ b/lnet/ulnds/dispatch.h @@ -0,0 +1,39 @@ +/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- + * vim:expandtab:shiftwidth=8:tabstop=8: + * + * Copyright (c) 2002 Cray Inc. + * Copyright (c) 2002 Eric Hoffman + * + * This file is part of Portals, http://www.sf.net/projects/sandiaportals/ + */ + +/* this file is only called dispatch.h to prevent it + from colliding with /usr/include/sys/select.h */ + +typedef struct io_handler *io_handler; + +struct io_handler{ + io_handler *last; + io_handler next; + int fd; + int type; + int (*function)(void *); + void *argument; + int disabled; +}; + + +#define READ_HANDLER 1 +#define WRITE_HANDLER 2 +#define EXCEPTION_HANDLER 4 +#define ALL_HANDLER (READ_HANDLER | WRITE_HANDLER | EXCEPTION_HANDLER) + +io_handler register_io_handler(int fd, + int type, + int (*function)(void *), + void *arg); + +void remove_io_handler (io_handler i); +void init_unix_timer(void); +void select_timer_block(when until); +when now(void);