mvpkm_comm_ev.c 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. /*
  2. * Linux 2.6.32 and later Kernel module for VMware MVP Hypervisor Support
  3. *
  4. * Copyright (C) 2010-2013 VMware, Inc. All rights reserved.
  5. *
  6. * This program is free software; you can redistribute it and/or modify it
  7. * under the terms of the GNU General Public License version 2 as published by
  8. * the Free Software Foundation.
  9. *
  10. * This program is distributed in the hope that it will be useful, but WITHOUT
  11. * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  12. * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
  13. * more details.
  14. *
  15. * You should have received a copy of the GNU General Public License along with
  16. * this program; see the file COPYING. If not, write to the Free Software
  17. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  18. */
  19. #line 5
  20. /**
  21. * @file
  22. *
  23. * @brief mvpkm kernel hooks for Comm event signaling
  24. */
  25. #include <linux/module.h>
  26. #include "comm_transp_impl.h"
  27. int (*CommTranspEvProcess)(CommTranspID *id, CommTranspIOEvent event);
  28. /**
  29. * @brief Register a processing callback for the host when a signal
  30. * is received from the guest. Supports only a single comm "service"
  31. * on the host.
  32. * @param commProcessFunc function pointer to process a signal
  33. */
  34. void
  35. Mvpkm_CommEvRegisterProcessCB(int (*commProcessFunc)(CommTranspID*,
  36. CommTranspIOEvent))
  37. {
  38. CommTranspEvProcess = commProcessFunc;
  39. }
  40. EXPORT_SYMBOL(Mvpkm_CommEvRegisterProcessCB);
  41. /**
  42. * @brief Unregister the processing callback for the host when a signal
  43. * is received from the guest.
  44. */
  45. void
  46. Mvpkm_CommEvUnregisterProcessCB(void)
  47. {
  48. CommTranspEvProcess = NULL;
  49. }
  50. EXPORT_SYMBOL(Mvpkm_CommEvUnregisterProcessCB);