Ignore:
Timestamp:
Jan 12, 2006, 6:58:57 PM (16 years ago)
Author:
root
Message:

Update 2005-12-25

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/internal.h

    r6 r20  
    7272#define TR_HTONL(a,p) *((uint32_t*)(p)) = htonl((a))
    7373
    74 /* Multithreading support: native threads on BeOS, pthreads elsewhere */
    75 #ifdef SYS_BEOS
    76 #  include <kernel/OS.h>
    77 #  define tr_thread_t             thread_id
    78 #  define tr_threadCreate(pt,f,d) *(pt) = spawn_thread((void*)f,"",10,d); \
    79                                           resume_thread(*(pt));
    80 #  define tr_threadJoin(t)        { long e; wait_for_thread(t,&e); }
    81 #  define tr_lock_t               sem_id
    82 #  define tr_lockInit(pl)         *(pl) = create_sem(1,"")
    83 #  define tr_lockLock(l)          acquire_sem(l)
    84 #  define tr_lockUnlock(l)        release_sem(l)
    85 #  define tr_lockClose(l)         delete_sem(l)
    86 #else
    87 #  include <pthread.h>
    88 #  define tr_thread_t             pthread_t
    89 #  define tr_threadCreate(pt,f,d) pthread_create(pt,NULL,(void*)f,d)
    90 #  define tr_threadJoin(t)        pthread_join(t,NULL)
    91 #  define tr_lock_t               pthread_mutex_t
    92 #  define tr_lockInit(pl)         pthread_mutex_init(pl,NULL)
    93 #  define tr_lockLock(l)          pthread_mutex_lock(&l)
    94 #  define tr_lockUnlock(l)        pthread_mutex_unlock(&l)
    95 #  define tr_lockClose(l)         pthread_mutex_destroy(&l)
    96 #endif
    97 
    9874/* Sometimes the system defines MAX/MIN, sometimes not. In the latter
    9975   case, define those here since we will use them */
     
    11086typedef struct tr_completion_s tr_completion_t;
    11187
     88#include "platform.h"
    11289#include "bencode.h"
    11390#include "metainfo.h"
     
    172149    uint64_t          downloaded[10];
    173150    uint64_t          uploaded[10];
    174 
    175     char            * prefsDirectory;
    176151};
    177152
     
    191166    char           id[21];
    192167    char           key[21];
    193     char           prefsDirectory[256];
    194168};
    195169
Note: See TracChangeset for help on using the changeset viewer.