~ubuntu-branches/ubuntu/raring/libpthread-workqueue/raring

« back to all changes in this revision

Viewing changes to src/private.h

  • Committer: Bazaar Package Importer
  • Author(s): Mark Heily
  • Date: 2011-07-09 10:39:08 UTC
  • mto: (5.1.1 sid)
  • mto: This revision was merged to the branch mainline in revision 7.
  • Revision ID: james.westby@ubuntu.com-20110709103908-0aize483bj2nfazj
Tags: upstream-0.8.1
ImportĀ upstreamĀ versionĀ 0.8.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
60
60
 
61
61
/* Whether to use real-time threads for the workers if available */
62
62
 
63
 
extern int USE_RT_THREADS;
 
63
extern unsigned int PWQ_RT_THREADS;
 
64
extern unsigned int PWQ_SPIN_USEC;
 
65
extern unsigned int PWQ_SPIN_THREADS;
 
66
 
 
67
/* A limit of the number of cpu:s that we view as available, useful when e.g. using processor sets */
 
68
extern unsigned int PWQ_ACTIVE_CPU;
64
69
 
65
70
#if __GNUC__
66
71
#define fastpath(x)     ((__typeof__(x))__builtin_expect((long)(x), ~0l))
95
100
#endif
96
101
};
97
102
 
98
 
struct worker {
99
 
    LIST_ENTRY(worker)   entries;
100
 
    pthread_t            tid;
101
 
    enum {
102
 
        WORKER_STATE_SLEEPING,
103
 
        WORKER_STATE_RUNNING,
104
 
        WORKER_STATE_ZOMBIE,
105
 
    } state;
106
 
};
107
 
 
108
103
struct _pthread_workqueue {
109
104
    unsigned int         sig;    /* Unique signature for this structure */
110
105
    unsigned int         flags;
120
115
 
121
116
/* manager.c */
122
117
int manager_init(void);
 
118
unsigned long manager_peek(const char *);
123
119
void manager_workqueue_create(struct _pthread_workqueue *);
124
120
void manager_workqueue_additem(struct _pthread_workqueue *, struct work *);
125
121