tag | line | file | source code |
upd | 119 | net/unix/sock.c | static void unix_lock(struct unix_proto_data *upd) |
upd | 121 | net/unix/sock.c | while (upd->lock_flag) |
upd | 122 | net/unix/sock.c | sleep_on(&upd->wait); |
upd | 123 | net/unix/sock.c | upd->lock_flag = 1; |
upd | 127 | net/unix/sock.c | static void unix_unlock(struct unix_proto_data *upd) |
upd | 129 | net/unix/sock.c | upd->lock_flag = 0; |
upd | 130 | net/unix/sock.c | wake_up(&upd->wait); |
upd | 219 | net/unix/sock.c | struct unix_proto_data *upd; |
upd | 221 | net/unix/sock.c | for(upd = unix_datas; upd <= last_unix_data; ++upd) |
upd | 223 | net/unix/sock.c | if (upd->refcnt > 0 && upd->socket && |
upd | 224 | net/unix/sock.c | upd->socket->state == SS_UNCONNECTED && |
upd | 225 | net/unix/sock.c | upd->sockaddr_un.sun_family == sockun->sun_family && |
upd | 226 | net/unix/sock.c | upd->inode == inode) |
upd | 228 | net/unix/sock.c | return(upd); |
upd | 243 | net/unix/sock.c | struct unix_proto_data *upd; |
upd | 246 | net/unix/sock.c | for(upd = unix_datas; upd <= last_unix_data; ++upd) |
upd | 248 | net/unix/sock.c | if (!upd->refcnt) |
upd | 250 | net/unix/sock.c | upd->refcnt = -1; /* unix domain socket not yet initialised - bgm */ |
upd | 252 | net/unix/sock.c | upd->socket = NULL; |
upd | 253 | net/unix/sock.c | upd->sockaddr_len = 0; |
upd | 254 | net/unix/sock.c | upd->sockaddr_un.sun_family = 0; |
upd | 255 | net/unix/sock.c | upd->buf = NULL; |
upd | 256 | net/unix/sock.c | upd->bp_head = upd->bp_tail = 0; |
upd | 257 | net/unix/sock.c | upd->inode = NULL; |
upd | 258 | net/unix/sock.c | upd->peerupd = NULL; |
upd | 259 | net/unix/sock.c | return(upd); |
upd | 273 | net/unix/sock.c | static inline void unix_data_ref(struct unix_proto_data *upd) |
upd | 275 | net/unix/sock.c | if (!upd) |
upd | 279 | net/unix/sock.c | ++upd->refcnt; |
upd | 283 | net/unix/sock.c | static void unix_data_deref(struct unix_proto_data *upd) |
upd | 285 | net/unix/sock.c | if (!upd) |
upd | 289 | net/unix/sock.c | if (upd->refcnt == 1) |
upd | 291 | net/unix/sock.c | if (upd->buf) |
upd | 293 | net/unix/sock.c | free_page((unsigned long)upd->buf); |
upd | 294 | net/unix/sock.c | upd->buf = NULL; |
upd | 295 | net/unix/sock.c | upd->bp_head = upd->bp_tail = 0; |
upd | 298 | net/unix/sock.c | --upd->refcnt; |
upd | 309 | net/unix/sock.c | struct unix_proto_data *upd; |
upd | 320 | net/unix/sock.c | if (!(upd = unix_data_alloc())) |
upd | 325 | net/unix/sock.c | if (!(upd->buf = (char*) get_free_page(GFP_USER))) |
upd | 328 | net/unix/sock.c | unix_data_deref(upd); |
upd | 331 | net/unix/sock.c | upd->protocol = protocol; |
upd | 332 | net/unix/sock.c | upd->socket = sock; |
upd | 333 | net/unix/sock.c | UN_DATA(sock) = upd; |
upd | 334 | net/unix/sock.c | upd->refcnt = 1; /* Now its complete - bgm */ |
upd | 344 | net/unix/sock.c | struct unix_proto_data *upd = UN_DATA(oldsock); |
upd | 345 | net/unix/sock.c | return(unix_proto_create(newsock, upd->protocol)); |
upd | 355 | net/unix/sock.c | struct unix_proto_data *upd = UN_DATA(sock); |
upd | 357 | net/unix/sock.c | if (!upd) |
upd | 360 | net/unix/sock.c | if (upd->socket != sock) |
upd | 366 | net/unix/sock.c | if (upd->inode) |
upd | 368 | net/unix/sock.c | iput(upd->inode); |
upd | 369 | net/unix/sock.c | upd->inode = NULL; |
upd | 373 | net/unix/sock.c | upd->socket = NULL; |
upd | 375 | net/unix/sock.c | if (upd->peerupd) |
upd | 376 | net/unix/sock.c | unix_data_deref(upd->peerupd); |
upd | 377 | net/unix/sock.c | unix_data_deref(upd); |
upd | 396 | net/unix/sock.c | struct unix_proto_data *upd = UN_DATA(sock); |
upd | 405 | net/unix/sock.c | if (upd->sockaddr_len || upd->inode) |
upd | 410 | net/unix/sock.c | memcpy(&upd->sockaddr_un, umyaddr, sockaddr_len); |
upd | 411 | net/unix/sock.c | upd->sockaddr_un.sun_path[sockaddr_len-UN_PATH_OFFSET] = '\0'; |
upd | 412 | net/unix/sock.c | if (upd->sockaddr_un.sun_family != AF_UNIX) |
upd | 417 | net/unix/sock.c | memcpy(fname, upd->sockaddr_un.sun_path, sockaddr_len-UN_PATH_OFFSET); |
upd | 425 | net/unix/sock.c | i = open_namei(fname, 0, S_IFSOCK, &upd->inode, NULL); |
upd | 434 | net/unix/sock.c | upd->sockaddr_len = sockaddr_len; /* now its legal */ |
upd | 583 | net/unix/sock.c | struct unix_proto_data *upd; |
upd | 592 | net/unix/sock.c | upd = UN_DATA(sock->conn); |
upd | 595 | net/unix/sock.c | upd = UN_DATA(sock); |
upd | 597 | net/unix/sock.c | len = upd->sockaddr_len; |
upd | 598 | net/unix/sock.c | memcpy(usockaddr, &upd->sockaddr_un, len); |
upd | 610 | net/unix/sock.c | struct unix_proto_data *upd; |
upd | 616 | net/unix/sock.c | upd = UN_DATA(sock); |
upd | 617 | net/unix/sock.c | while(!(avail = UN_BUF_AVAIL(upd))) |
upd | 637 | net/unix/sock.c | unix_lock(upd); |
upd | 651 | net/unix/sock.c | if (cando >(part = BUF_SIZE - upd->bp_tail)) |
upd | 653 | net/unix/sock.c | memcpy_tofs(ubuf, upd->buf + upd->bp_tail, cando); |
upd | 654 | net/unix/sock.c | upd->bp_tail =(upd->bp_tail + cando) &(BUF_SIZE-1); |
upd | 659 | net/unix/sock.c | avail = UN_BUF_AVAIL(upd); |
upd | 662 | net/unix/sock.c | unix_unlock(upd); |
upd | 763 | net/unix/sock.c | struct unix_proto_data *upd, *peerupd; |
upd | 783 | net/unix/sock.c | upd = UN_DATA(sock); |
upd | 784 | net/unix/sock.c | if (UN_BUF_AVAIL(upd)) /* even if disconnected */ |
upd | 821 | net/unix/sock.c | struct unix_proto_data *upd, *peerupd; |
upd | 824 | net/unix/sock.c | upd = UN_DATA(sock); |
upd | 835 | net/unix/sock.c | if (UN_BUF_AVAIL(upd) || peerupd) |
upd | 836 | net/unix/sock.c | put_fs_long(UN_BUF_AVAIL(upd),(unsigned long *)arg); |
upd | 889 | net/unix/sock.c | struct unix_proto_data *upd; |
upd | 897 | net/unix/sock.c | for(upd = unix_datas; upd <= last_unix_data; ++upd) |
upd | 899 | net/unix/sock.c | upd->refcnt = 0; |