Lines Matching defs:mp

83 isc_mutex_init_profile(isc_mutex_t *mp, const char *file, int line) {
86 err = pthread_mutex_init(&mp->mutex, NULL);
106 mp->stats = &stats[stats_next++];
110 mp->stats->file = file;
111 mp->stats->line = line;
112 mp->stats->count = 0;
113 timevalclear(&mp->stats->locked_total);
114 timevalclear(&mp->stats->wait_total);
116 mp->stats->lockers[i].file = NULL;
117 mp->stats->lockers[i].line = 0;
118 mp->stats->lockers[i].count = 0;
119 timevalclear(&mp->stats->lockers[i].locked_total);
120 timevalclear(&mp->stats->lockers[i].wait_total);
127 isc_mutex_lock_profile(isc_mutex_t *mp, const char *file, int line) {
135 if (pthread_mutex_lock(&mp->mutex) != 0)
139 mp->stats->lock_t = postlock_t;
143 mp->stats->count++;
144 timevaladd(&mp->stats->wait_total, &postlock_t);
147 if (mp->stats->lockers[i].file == NULL) {
148 locker = &mp->stats->lockers[i];
152 } else if (mp->stats->lockers[i].file == file &&
153 mp->stats->lockers[i].line == line) {
154 locker = &mp->stats->lockers[i];
164 mp->stats->cur_locker = locker;
170 isc_mutex_unlock_profile(isc_mutex_t *mp, const char *file, int line) {
176 if (mp->stats->cur_locker != NULL) {
178 timevalsub(&unlock_t, &mp->stats->lock_t);
179 timevaladd(&mp->stats->locked_total, &unlock_t);
180 timevaladd(&mp->stats->cur_locker->locked_total, &unlock_t);
181 mp->stats->cur_locker = NULL;
184 return ((pthread_mutex_unlock((&mp->mutex)) == 0) ? \
235 isc_mutex_init_errcheck(isc_mutex_t *mp) {
242 err = pthread_mutex_init(mp, &errcheck);
275 isc__mutex_init(isc_mutex_t *mp, const char *file, unsigned int line) {
284 err = pthread_mutex_init(mp, &attr);
286 err = pthread_mutex_init(mp, ISC__MUTEX_ATTRS);