2 * TUX - Integrated Application Protocols Layer and Object Cache
4 * Copyright (C) 2000, 2001, Ingo Molnar <mingo@redhat.com>
6 * postpone.c: postpone/continue userspace requests
11 /****************************************************************
12 * This program is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License as published by
14 * the Free Software Foundation; either version 2, or (at your option)
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, write to the Free Software
24 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
26 ****************************************************************/
28 void postpone_request (tux_req_t *req)
32 INC_STAT(nr_postpone_pending);
37 * Continue a postponed request. The request will show up in the
38 * userspace queue and will be handled by the fast thread.
39 * A request can only be postponed in a TUX process, but can be
40 * continued from any process that has access to the socket file
43 int continue_request (int fd)
50 sock = sockfd_lookup(fd, &err);
51 if (!sock || !sock->sk)
53 req = sock->sk->sk_user_data;
65 DEC_STAT(nr_postpone_pending);
67 Dprintk("continuing postponed req %p.\n", req);
68 add_req_to_workqueue(req);