*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->HP-UX 11i man pages -> t_sync (3)              
Title
Content
Arch
Section
 

Contents


 t_sync(3)                                                         t_sync(3)




 NAME    [Toc]    [Back]
      t_sync() - synchronize transport library

 SYNOPSIS    [Toc]    [Back]
      #include <xti.h>            /* for X/OPEN Transport Interface - XTI */
      /* or */
      #include <tiuser.h>         /* for Transport Layer Interface - TLI  */

      int t_sync (fd);
      int fd;

 DESCRIPTION    [Toc]    [Back]
      For the transport endpoint specified by fd, the t_sync() function
      synchronizes the data structures managed by the transport library with
      information from the underlying transport provider. In doing so, it
      can convert an uninitialized file descriptor (obtained via open(),
      dup() or as a result of a fork() and exec()) to an initialized
      endpoint, assuming that the file descriptor referenced a transport
      endpoint, by updating and allocating the necessary library data
      structures.  This function also allows two cooperating processes to
      synchronize their interaction with a transport provider.

      For example, if a process forks a new process and issues an exec(),
      the new process must issue a t_sync() to build the private library
      data structure associated with a transport endpoint and to synchronize
      the data structure with the relevant provider information.

      It is important to remember that the transport provider treats all
      users of a transport endpoint as a single user.  If multiple processes
      are using the same endpoint, they should coordinate their activities
      so as not to violate the state of the transport endpoint.  The
      function t_sync() returns the current state of the transport endpoint
      to the user, thereby enabling the user to verify the state before
      taking further action.  This coordination is only valid among
      cooperating processes; it is possible that a process or an incoming
      event could change the endpoint's state after a t_sync() is issued.

      If the transport endpoint is undergoing a state transition when
      t_sync() is called, the function will fail.

    Thread-Safeness    [Toc]    [Back]
      The t_sync() function is safe to be called by multithreaded
      applications, and it is thread-safe for both POSIX Threads and DCE
      User Threads.  It has a cancellation point.  It is neither asynccancel
 safe nor async-signal safe.  Finally, it is not fork-safe.

    Valid States    [Toc]    [Back]
       All - apart from T_UNINIT.

 RETURN VALUE    [Toc]    [Back]
      t_sync returns the state of the transport connection endpoint on



 Hewlett-Packard Company            - 1 -   HP-UX 11i Version 2: August 2003






 t_sync(3)                                                         t_sync(3)




      successful completion and -1 on failure, and t_errno is set to
      indicate the error.  The state returned is one of the following:

      T_UNBND        Unbound

      T_IDLE         Idle

      T_OUTCON       Outgoing connection pending

      T_INCON        Incoming connection pending

      T_DATAXFER     Data transfer

      T_OUTREL       Outgoing orderly release (waiting for an orderly
                     release indication)

      T_INREL        Incoming orderly release (waiting for an orderly
                     release request)

 ERRORS    [Toc]    [Back]
      On failure, t_errno is set to one of the following:

      [TBADF]          The specified file descriptor does not refer to a
                       transport endpoint.  This error may be returned when
                       the fd has been previously closed or an erroneous
                       number may have been passed to the call.

      [TSTATECHNG]     The transport endpoint is undergoing a state change.

      [TSYSERR]        A system error has occurred during execution of this
                       function.

      [TPROTO]         (XTI only) This error indicates that a communication
                       problem has been detected between XTI and the
                       transport provider for which there is no other
                       suitable XTI (t_errno).

 SEE ALSO    [Toc]    [Back]
      t_open(3), t_getstate(3), dup(2), exec(2), fork(2), open(2).

 STANDARDS CONFORMANCE    [Toc]    [Back]
      t_sync(): SVID2, XPG3, XPG4


 Hewlett-Packard Company            - 2 -   HP-UX 11i Version 2: August 2003
[ Back ]
      
      
 Similar pages
Name OS Title
named.reload FreeBSD cause the name server to synchronize its database
msync FreeBSD synchronize a mapped region
fdatasync NetBSD synchronize the data of a file
msync OpenBSD synchronize a mapped region
msync Tru64 Synchronize a mapped file
msync NetBSD synchronize a mapped region
sync HP-UX synchronize file systems
msync Linux synchronize a file with a memory map
msync IRIX synchronize memory with physical storage
glxjoinswapgroupsgix IRIX synchronize buffer swaps with other drawables
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service