| 1 | /*************************************************************************** |
|---|
| 2 | * Copyright (c) 2004-2008, Broadcom Corporation |
|---|
| 3 | * All Rights Reserved |
|---|
| 4 | * Confidential Property of Broadcom Corporation |
|---|
| 5 | * |
|---|
| 6 | * THIS SOFTWARE MAY ONLY BE USED SUBJECT TO AN EXECUTED SOFTWARE LICENSE |
|---|
| 7 | * AGREEMENT BETWEEN THE USER AND BROADCOM. YOU HAVE NO RIGHT TO USE OR |
|---|
| 8 | * EXPLOIT THIS MATERIAL EXCEPT SUBJECT TO THE TERMS OF SUCH AN AGREEMENT. |
|---|
| 9 | * |
|---|
| 10 | * $brcm_Workfile: bsyslib_callback.h $ |
|---|
| 11 | * $brcm_Revision: Hydra_Software_Devel/1 $ |
|---|
| 12 | * $brcm_Date: 3/24/08 3:08p $ |
|---|
| 13 | * |
|---|
| 14 | * Revision History: |
|---|
| 15 | * |
|---|
| 16 | * $brcm_Log: /magnum/syslib/framework/noarch/bsyslib_callback.h $ |
|---|
| 17 | * |
|---|
| 18 | * Hydra_Software_Devel/1 3/24/08 3:08p bandrews |
|---|
| 19 | * PR40865: Fixed |
|---|
| 20 | * |
|---|
| 21 | * Hydra_Software_Devel/1 1/25/08 9:24p bandrews |
|---|
| 22 | * PR36148: Extracted callback code into separate file |
|---|
| 23 | ***************************************************************************/ |
|---|
| 24 | |
|---|
| 25 | #include "bstd.h" |
|---|
| 26 | #include "bkni.h" |
|---|
| 27 | |
|---|
| 28 | #ifndef BSYSLIB_CALLBACK_H__ |
|---|
| 29 | #define BSYSLIB_CALLBACK_H__ |
|---|
| 30 | |
|---|
| 31 | /* |
|---|
| 32 | Summary: |
|---|
| 33 | A generic callback signature with only user supplied context |
|---|
| 34 | Description: |
|---|
| 35 | */ |
|---|
| 36 | typedef BERR_Code (*BSYSlib_Callback_Signature) |
|---|
| 37 | ( |
|---|
| 38 | void * pvParm1, /* first user context parameter [in] */ |
|---|
| 39 | int iParm2 /* second user context parameter [in] */ |
|---|
| 40 | ); |
|---|
| 41 | |
|---|
| 42 | /* |
|---|
| 43 | Summary: |
|---|
| 44 | */ |
|---|
| 45 | typedef struct |
|---|
| 46 | { |
|---|
| 47 | BSYSlib_Callback_Signature pfDo; |
|---|
| 48 | void * pvParm1; |
|---|
| 49 | int iParm2; |
|---|
| 50 | } BSYSlib_Callback; |
|---|
| 51 | |
|---|
| 52 | /* |
|---|
| 53 | Summary: |
|---|
| 54 | */ |
|---|
| 55 | void BSYSlib_Callback_Init( |
|---|
| 56 | BSYSlib_Callback * psCallback |
|---|
| 57 | ); |
|---|
| 58 | |
|---|
| 59 | /* |
|---|
| 60 | Summary: |
|---|
| 61 | */ |
|---|
| 62 | BERR_Code BSYSlib_Callback_Invoke( |
|---|
| 63 | BSYSlib_Callback * psCallback |
|---|
| 64 | ); |
|---|
| 65 | |
|---|
| 66 | #endif /* BSYSLIB_CALLBACK_H__ */ |
|---|
| 67 | |
|---|