Lines Matching defs:hp
39 slp_handle_impl_t *hp;
46 if (!(hp = malloc(sizeof (*hp)))) {
52 hp->pending_outcall = SLP_FALSE;
53 (void) mutex_init(&(hp->outcall_lock), NULL, NULL);
54 (void) cond_init(&(hp->outcall_cv), NULL, NULL);
55 hp->close_on_end = SLP_FALSE;
56 hp->consumer_tid = 0;
59 if (!(hp->locale = SLPGetProperty(SLP_CONFIG_LOCALE))) {
60 hp->locale = pcLang;
63 if (!(hp->locale = strdup(hp->locale))) {
64 free(hp);
69 hp->cancel = 0;
73 hp->async = SLP_TRUE;
75 hp->async = SLP_FALSE;
78 hp->tcp_lock = NULL;
79 hp->tcp_wait = NULL;
80 hp->tcp_ref_cnt = 0;
83 hp->q = NULL;
86 hp->ifinfo = NULL;
89 hp->force_multicast = SLP_FALSE;
92 hp->internal_call = SLP_FALSE;
94 *phSLP = hp;
98 void slp_cleanup_handle(slp_handle_impl_t *hp) {
100 if (hp->tcp_lock) free(hp->tcp_lock);
101 if (hp->tcp_wait) free(hp->tcp_wait);
102 if (hp->ifinfo) {
103 slp_free_ifinfo(hp->ifinfo);
104 free(hp->ifinfo);
106 free((void *) hp->locale);
107 free(hp);
111 slp_handle_impl_t *hp = (slp_handle_impl_t *)hSLP;
128 (void) mutex_lock(&(hp->outcall_lock));
129 if (hp->pending_outcall) {
132 hp->cancel = 1;
133 if (hp->q) {
134 if (slp_enqueue_at_head(hp->q, NULL) != SLP_OK) {
139 if (thr_self() == hp->consumer_tid || hp->close_on_end) {
141 hp->close_on_end = SLP_TRUE;
142 (void) mutex_unlock(&(hp->outcall_lock));
146 while (hp->pending_outcall) {
147 (void) cond_wait(&(hp->outcall_cv), &(hp->outcall_lock));
150 (void) mutex_unlock(&(hp->outcall_lock));
153 slp_cleanup_handle(hp);