This is the mail archive of the libc-hacker@sourceware.cygnus.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Clean up <sys/types.h>


> 
> hjl@lucon.org (H.J. Lu) writes:
> 
> > It should be cleaned up.  For each header file, which include
> > <sys/types.h>, it should do something like
> 
> This really should not be necessary.  What are the actual problems?
> 

VSX-PCT complains the lines with "^^^^^^^^".

struct __sched_param
  {
    int sched_priority;
    ^^^^^^^^^^^^^^^^^^^^
  };

struct _pthread_fastlock
{  
  long int status;              /* "Free" or "taken" or head of waiting list */
  ^^^^^^^^^^^^^^^^
  int spinlock;                 /* For compare-and-swap emulation */ 
};

typedef struct
{
  int detachstate;
  ^^^^^^^^^^^^^^^^
  int schedpolicy;
  struct __sched_param schedparam;
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  int inheritsched;
  int scope;
  size_t guardsize;
  int stackaddr_set;
  void *stackaddr;
^^^^^^^^^^^^^^^^^^^^^
  size_t stacksize;
} pthread_attr_t;
^^^^^^^^^^^^^^^^^

typedef struct
{
  struct _pthread_fastlock c_lock; /* Protect against concurrent access */
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  _pthread_descr c_waiting;        /* Threads waiting on this condition */
} pthread_cond_t;
^^^^^^^^^^^^^^^

typedef struct
{
  int dummy;
  ^^^^^^^^^^^^^
} pthread_condattr_t;
^^^^^^^^^^^^^^^^^^^^^

typedef struct
{
  int m_reserved;               /* Reserved for future use */
^^^^^^^^^^^^^^^^^^
  int m_count;                  /* Depth of recursive locking */
  _pthread_descr m_owner;       /* Owner thread (if recursive or errcheck) */
  int m_kind;                   /* Mutex kind: fast, recursive or errcheck */
  struct _pthread_fastlock m_lock; /* Underlying fast lock */
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
} pthread_mutex_t;
^^^^^^^^^^^^^^^^

typedef struct
{
  int mutexkind;
^^^^^^^^^^^^^^^^^^^
} pthread_mutexattr_t;
^^^^^^^^^^^^^^^^^^^^^


-- 
H.J. Lu (hjl@gnu.org)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]