Ignore:
Timestamp:
2012-01-23 11:06:46 (2 years ago)
Author:
Poul-Henning Kamp <phk@…>
Branches:
master, 4.0, experimental-ims
Children:
f965f4
Parents:
29fcad4
git-author:
Poul-Henning Kamp <phk@…> (2012-01-23 11:06:46)
git-committer:
Poul-Henning Kamp <phk@…> (2012-01-23 11:06:46)
Message:

Add the new pool-task API so Martin can see it.

Presently unused and untested.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • bin/varnishd/cache/cache.h

    rdd103d redf514  
    287287}; 
    288288 
     289/* Worker pool stuff -------------------------------------------------*/ 
     290 
     291typedef void pool_func_t(struct pool *pp, void *priv); 
     292 
     293struct pool_task { 
     294        VTAILQ_ENTRY(pool_task)         list; 
     295        pool_func_t                     *func; 
     296        void                            *priv; 
     297}; 
     298 
     299enum pool_how { 
     300        POOL_NO_QUEUE, 
     301        POOL_QUEUE_FRONT, 
     302        POOL_QUEUE_BACK 
     303}; 
     304 
    289305/*--------------------------------------------------------------------*/ 
    290306 
     
    307323        void                    *nhashpriv; 
    308324        struct dstat            stats; 
     325 
     326        /* New Pool stuff */ 
     327        pool_func_t             *pool_func; 
     328        void                    *pool_priv; 
    309329 
    310330        /* Pool stuff */ 
     
    649669        struct req              *req; 
    650670 
     671        struct pool_task        task; 
    651672        VTAILQ_ENTRY(sess)      list; 
    652673 
     
    895916void Pool_Work_Thread(void *priv, struct worker *w); 
    896917int Pool_Schedule(struct pool *pp, struct sess *sp); 
     918int Pool_Task(struct pool *pp, struct pool_task *task, enum pool_how how); 
    897919 
    898920#define WRW_IsReleased(w)       ((w)->wrw.wfd == NULL) 
Note: See TracChangeset for help on using the changeset viewer.