src/server/ucx/ucx.h

Mon, 23 Jul 2012 15:13:19 +0200

author
Olaf Wintermann <olaf.wintermann@gmail.com>
date
Mon, 23 Jul 2012 15:13:19 +0200
changeset 32
ebba53de8b18
parent 31
280250e45ba6
child 36
450d2d5f4735
permissions
-rw-r--r--

added solaris 10 support

/* 
 * File:   ucx.h
 * Author: olaf
 *
 * Created on 31. Dezember 2011, 17:17
 */

#ifndef UCX_H
#define	UCX_H

#include <stdlib.h>

#ifdef	__cplusplus
extern "C" {
#endif

#define UCX_FOREACH(type,list,elem) \
        for (type elem = list ; elem != NULL ; elem = elem->next)
    
/* source,data -> errno */
typedef int(*ucx_callback)(void*,void*);

/* element1,element2,custom data -> {-1,0,1} */
typedef int(*cmp_func)(void*,void*,void*);

/* element,custom data -> copy of element */
typedef void*(*copy_func)(void*,void*);

#ifdef	__cplusplus
}
#endif

#endif	/* UCX_H */

mercurial