tag | line | file | source code |
upd | 118 | net/unix/sock.c | static void unix_lock(struct unix_proto_data *upd) |
upd | 120 | net/unix/sock.c | while (upd->lock_flag) |
upd | 121 | net/unix/sock.c | sleep_on(&upd->wait); |
upd | 122 | net/unix/sock.c | upd->lock_flag = 1; |
upd | 126 | net/unix/sock.c | static void unix_unlock(struct unix_proto_data *upd) |
upd | 128 | net/unix/sock.c | upd->lock_flag = 0; |
upd | 129 | net/unix/sock.c | wake_up(&upd->wait); |
upd | 218 | net/unix/sock.c | struct unix_proto_data *upd; |
upd | 220 | net/unix/sock.c | for(upd = unix_datas; upd <= last_unix_data; ++upd) |
upd | 222 | net/unix/sock.c | if (upd->refcnt > 0 && upd->socket && |
upd | 223 | net/unix/sock.c | upd->socket->state == SS_UNCONNECTED && |
upd | 224 | net/unix/sock.c | upd->sockaddr_un.sun_family == sockun->sun_family && |
upd | 225 | net/unix/sock.c | upd->inode == inode) |
upd | 227 | net/unix/sock.c | return(upd); |
upd | 242 | net/unix/sock.c | struct unix_proto_data *upd; |
upd | 245 | net/unix/sock.c | for(upd = unix_datas; upd <= last_unix_data; ++upd) |
upd | 247 | net/unix/sock.c | if (!upd->refcnt) |
upd | 249 | net/unix/sock.c | upd->refcnt = -1; /* unix domain socket not yet initialised - bgm */ |
upd | 251 | net/unix/sock.c | upd->socket = NULL; |
upd | 252 | net/unix/sock.c | upd->sockaddr_len = 0; |
upd | 253 | net/unix/sock.c | upd->sockaddr_un.sun_family = 0; |
upd | 254 | net/unix/sock.c | upd->buf = NULL; |
upd | 255 | net/unix/sock.c | upd->bp_head = upd->bp_tail = 0; |
upd | 256 | net/unix/sock.c | upd->inode = NULL; |
upd | 257 | net/unix/sock.c | upd->peerupd = NULL; |
upd | 258 | net/unix/sock.c | return(upd); |
upd | 272 | net/unix/sock.c | static inline void unix_data_ref(struct unix_proto_data *upd) |
upd | 274 | net/unix/sock.c | if (!upd) |
upd | 278 | net/unix/sock.c | ++upd->refcnt; |
upd | 282 | net/unix/sock.c | static void unix_data_deref(struct unix_proto_data *upd) |
upd | 284 | net/unix/sock.c | if (!upd) |
upd | 288 | net/unix/sock.c | if (upd->refcnt == 1) |
upd | 290 | net/unix/sock.c | if (upd->buf) |
upd | 292 | net/unix/sock.c | free_page((unsigned long)upd->buf); |
upd | 293 | net/unix/sock.c | upd->buf = NULL; |
upd | 294 | net/unix/sock.c | upd->bp_head = upd->bp_tail = 0; |
upd | 297 | net/unix/sock.c | --upd->refcnt; |
upd | 308 | net/unix/sock.c | struct unix_proto_data *upd; |
upd | 319 | net/unix/sock.c | if (!(upd = unix_data_alloc())) |
upd | 324 | net/unix/sock.c | if (!(upd->buf = (char*) get_free_page(GFP_USER))) |
upd | 327 | net/unix/sock.c | unix_data_deref(upd); |
upd | 330 | net/unix/sock.c | upd->protocol = protocol; |
upd | 331 | net/unix/sock.c | upd->socket = sock; |
upd | 332 | net/unix/sock.c | UN_DATA(sock) = upd; |
upd | 333 | net/unix/sock.c | upd->refcnt = 1; /* Now it's complete - bgm */ |
upd | 343 | net/unix/sock.c | struct unix_proto_data *upd = UN_DATA(oldsock); |
upd | 344 | net/unix/sock.c | return(unix_proto_create(newsock, upd->protocol)); |
upd | 354 | net/unix/sock.c | struct unix_proto_data *upd = UN_DATA(sock); |
upd | 356 | net/unix/sock.c | if (!upd) |
upd | 359 | net/unix/sock.c | if (upd->socket != sock) |
upd | 365 | net/unix/sock.c | if (upd->inode) |
upd | 367 | net/unix/sock.c | iput(upd->inode); |
upd | 368 | net/unix/sock.c | upd->inode = NULL; |
upd | 372 | net/unix/sock.c | upd->socket = NULL; |
upd | 374 | net/unix/sock.c | if (upd->peerupd) |
upd | 375 | net/unix/sock.c | unix_data_deref(upd->peerupd); |
upd | 376 | net/unix/sock.c | unix_data_deref(upd); |
upd | 395 | net/unix/sock.c | struct unix_proto_data *upd = UN_DATA(sock); |
upd | 404 | net/unix/sock.c | if (upd->sockaddr_len || upd->inode) |
upd | 409 | net/unix/sock.c | memcpy(&upd->sockaddr_un, umyaddr, sockaddr_len); |
upd | 410 | net/unix/sock.c | upd->sockaddr_un.sun_path[sockaddr_len-UN_PATH_OFFSET] = '\0'; |
upd | 411 | net/unix/sock.c | if (upd->sockaddr_un.sun_family != AF_UNIX) |
upd | 416 | net/unix/sock.c | memcpy(fname, upd->sockaddr_un.sun_path, sockaddr_len-UN_PATH_OFFSET); |
upd | 424 | net/unix/sock.c | i = open_namei(fname, 2, S_IFSOCK, &upd->inode, NULL); |
upd | 433 | net/unix/sock.c | upd->sockaddr_len = sockaddr_len; /* now it's legal */ |
upd | 584 | net/unix/sock.c | struct unix_proto_data *upd; |
upd | 593 | net/unix/sock.c | upd = UN_DATA(sock->conn); |
upd | 596 | net/unix/sock.c | upd = UN_DATA(sock); |
upd | 598 | net/unix/sock.c | len = upd->sockaddr_len; |
upd | 599 | net/unix/sock.c | memcpy(usockaddr, &upd->sockaddr_un, len); |
upd | 611 | net/unix/sock.c | struct unix_proto_data *upd; |
upd | 617 | net/unix/sock.c | upd = UN_DATA(sock); |
upd | 618 | net/unix/sock.c | while(!(avail = UN_BUF_AVAIL(upd))) |
upd | 640 | net/unix/sock.c | unix_lock(upd); |
upd | 654 | net/unix/sock.c | if (cando >(part = BUF_SIZE - upd->bp_tail)) |
upd | 656 | net/unix/sock.c | memcpy_tofs(ubuf, upd->buf + upd->bp_tail, cando); |
upd | 657 | net/unix/sock.c | upd->bp_tail =(upd->bp_tail + cando) &(BUF_SIZE-1); |
upd | 665 | net/unix/sock.c | avail = UN_BUF_AVAIL(upd); |
upd | 668 | net/unix/sock.c | unix_unlock(upd); |
upd | 774 | net/unix/sock.c | struct unix_proto_data *upd, *peerupd; |
upd | 794 | net/unix/sock.c | upd = UN_DATA(sock); |
upd | 795 | net/unix/sock.c | if (UN_BUF_AVAIL(upd)) /* even if disconnected */ |
upd | 832 | net/unix/sock.c | struct unix_proto_data *upd, *peerupd; |
upd | 835 | net/unix/sock.c | upd = UN_DATA(sock); |
upd | 846 | net/unix/sock.c | if (UN_BUF_AVAIL(upd) || peerupd) |
upd | 847 | net/unix/sock.c | put_fs_long(UN_BUF_AVAIL(upd),(unsigned long *)arg); |
upd | 900 | net/unix/sock.c | struct unix_proto_data *upd; |
upd | 908 | net/unix/sock.c | for(upd = unix_datas; upd <= last_unix_data; ++upd) |
upd | 910 | net/unix/sock.c | upd->refcnt = 0; |