| * Linux network driver for Brocade Converged Network Adapter. |
| * This program is free software; you can redistribute it and/or modify it |
| * under the terms of the GNU General Public License (GPL) Version 2 as |
| * published by the Free Software Foundation |
| * This program is distributed in the hope that it will be useful, but |
| * WITHOUT ANY WARRANTY; without even the implied warranty of |
| * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| * General Public License for more details. |
| * Copyright (c) 2005-2010 Brocade Communications Systems, Inc. |
| * @file bfa_wc.h Generic wait counter. |
| typedef void (*bfa_wc_resume_t) (void *cbarg); |
| bfa_wc_resume_t wc_resume; |
| bfa_wc_up(struct bfa_wc *wc) |
| bfa_wc_down(struct bfa_wc *wc) |
| wc->wc_resume(wc->wc_cbarg); |
| * Initialize a waiting counter. |
| bfa_wc_init(struct bfa_wc *wc, bfa_wc_resume_t wc_resume, void *wc_cbarg) |
| wc->wc_resume = wc_resume; |
| * Wait for counter to reach zero |
| bfa_wc_wait(struct bfa_wc *wc) |