Logo Search packages:      
Sourcecode: sofia-sip version File versions

su_port.h File Reference

Detailed Description

Internal OS-independent syncronization interface.

Defined when <su_port.h> has been included.

For internal use only.

This looks like the "reactor" pattern.

Pekka Pessi <Pekka.Pessi@nokia.com>
Created: Fri May 12 14:13:34 2000 ppessi

Definition in file su_port.h.

#include "sofia-sip/su_wait.h"
#include "su_module_debug.h"
#include <sofia-sip/su_alloc.h>
#include <assert.h>

Go to the source code of this file.


struct  su_base_port_s
struct  su_msg_s
struct  su_port_vtable
struct  su_root_s
struct  su_socket_port_s
struct  su_virtual_port_s


#define SU_MBOX_SIZE   2
#define SU_MSG_ARG_T   union { char anoymous[4]; }
#define su_pthread_port_deinit   su_base_port_deinit
#define su_pthread_port_execute   su_base_port_execute
#define su_pthread_port_init   su_base_port_init
#define su_pthread_port_lock   su_base_port_lock
#define su_pthread_port_thread   su_base_port_thread
#define su_pthread_port_unlock   su_base_port_unlock
#define su_pthread_port_wait   su_base_port_wait
#define SU_ROOT_MAGIC(r)   ((r) ? (r)->sur_magic : NULL)
#define SU_WAIT_MIN   (16)


typedef struct su_base_port_s su_base_port_t
typedef struct su_port_vtable su_port_vtable_t
typedef su_base_port_t su_pthread_port_t
typedef struct su_socket_port_s su_socket_port_t
typedef struct su_virtual_port_s su_virtual_port_t


enum  su_port_thread_op { su_port_thread_op_is_obtained, su_port_thread_op_release, su_port_thread_op_obtain }


SOFIAPUBFUN int su_base_port_add_prepoll (su_port_t *self, su_root_t *root, su_prepoll_f *, su_prepoll_magic_t *)
SOFIAPUBFUN void su_base_port_break (su_port_t *self)
SOFIAPUBFUN int su_base_port_decref (su_port_t *self, int blocking, char const *who)
SOFIAPUBFUN void su_base_port_deinit (su_port_t *self)
SOFIAPUBFUN int su_base_port_getmsgs (su_port_t *self)
SOFIAPUBFUN int su_base_port_getmsgs_from (su_port_t *self, su_port_t *from)
SOFIAPUBFUN struct _GSource * su_base_port_gsource (su_port_t *self)
SOFIAPUBFUN void su_base_port_incref (su_port_t *self, char const *who)
SOFIAPUBFUN int su_base_port_init (su_port_t *, su_port_vtable_t const *)
SOFIAPUBFUN void su_base_port_lock (su_port_t *self, char const *who)
SOFIAPUBFUN su_socket_t su_base_port_mbox (su_port_t *self)
SOFIAPUBFUN int su_base_port_multishot (su_port_t *self, int multishot)
SOFIAPUBFUN int su_base_port_remove_prepoll (su_port_t *self, su_root_t *root)
SOFIAPUBFUN void su_base_port_run (su_port_t *self)
SOFIAPUBFUN int su_base_port_send (su_port_t *self, su_msg_r rmsg)
SOFIAPUBFUN int su_base_port_start_shared (su_root_t *parent, su_clone_r return_clone, su_root_magic_t *magic, su_root_init_f init, su_root_deinit_f deinit)
SOFIAPUBFUN su_duration_t su_base_port_step (su_port_t *self, su_duration_t tout)
SOFIAPUBFUN int su_base_port_thread (su_port_t const *self, enum su_port_thread_op op)
SOFIAPUBFUN su_timer_t ** su_base_port_timers (su_port_t *self)
SOFIAPUBFUN void su_base_port_unlock (su_port_t *self, char const *who)
SOFIAPUBFUN void su_base_port_wait (su_clone_r rclone)
SOFIAPUBFUN void su_msg_delivery_report (su_msg_r msg)
su_inline int su_port_add_prepoll (su_port_t *self, su_root_t *root, su_prepoll_f *prepoll, su_prepoll_magic_t *magic)
su_inline void su_port_break (su_port_t *self)
SOFIAPUBFUN su_port_tsu_port_create (void) __attribute__((__malloc__))
su_inline void su_port_decref (su_port_t *self, char const *who)
su_inline int su_port_deregister (su_port_t *self, int i)
su_inline int su_port_eventmask (su_port_t *self, int index, int socket, int events)
SOFIAPUBFUN int su_port_execute (su_task_r const task, int(*function)(void *), void *arg, int *return_value)
su_inline int su_port_getmsgs (su_port_t *self)
su_inline int su_port_getmsgs_from (su_port_t *self, su_port_t *cloneport)
su_inline struct _GSource * su_port_gsource (su_port_t *self)
su_inline int su_port_has_thread (su_port_t *self)
su_inline su_home_tsu_port_home (su_port_t const *self)
su_inline void su_port_incref (su_port_t *self, char const *who)
su_inline void su_port_lock (su_port_t *self, char const *who)
su_inline int su_port_multishot (su_port_t *self, int multishot)
SOFIAPUBFUN char const * su_port_name (su_port_t const *port)
su_inline int su_port_obtain (su_port_t *self)
su_inline int su_port_own_thread (su_port_t const *self)
su_inline int su_port_register (su_port_t *self, su_root_t *root, su_wait_t *wait, su_wakeup_f callback, su_wakeup_arg_t *arg, int priority)
su_inline int su_port_release (su_port_t *self)
su_inline int su_port_remove_prepoll (su_port_t *self, su_root_t *root)
su_inline void su_port_run (su_port_t *self)
su_inline int su_port_send (su_port_t *self, su_msg_r rmsg)
su_inline su_duration_t su_port_step (su_port_t *self, su_duration_t tout)
su_inline su_timer_t ** su_port_timers (su_port_t *self)
su_inline void su_port_unlock (su_port_t *self, char const *who)
su_inline int su_port_unregister (su_port_t *self, su_root_t *root, su_wait_t *wait, su_wakeup_f callback, su_wakeup_arg_t *arg)
su_inline int su_port_unregister_all (su_port_t *self, su_root_t *root)
SOFIAPUBFUN void su_port_wait (su_clone_r rclone)
su_inline int su_port_wait_events (su_port_t *self, su_duration_t timeout)
su_inline void su_port_zapref (su_port_t *self, char const *who)
SOFIAPUBFUN su_root_tsu_root_create_with_port (su_root_magic_t *magic, su_port_t *port) __attribute__((__malloc__))
SOFIAPUBFUN void su_socket_port_deinit (su_socket_port_t *self)
SOFIAPUBFUN int su_socket_port_init (su_socket_port_t *, su_port_vtable_t const *)
SOFIAPUBFUN int su_socket_port_send (su_port_t *self, su_msg_r rmsg)
SOFIAPUBFUN su_duration_t su_timer_next_expires (su_timer_t const *t, su_time_t now)

Generated by  Doxygen 1.6.0   Back to index