+/* Routine io_service_add_notification_ool */
+kern_return_t is_io_service_add_notification_ool(
+ mach_port_t master_port,
+ io_name_t notification_type,
+ io_buf_ptr_t matching,
+ mach_msg_type_number_t matchingCnt,
+ mach_port_t wake_port,
+ io_async_ref_t reference,
+ mach_msg_type_number_t referenceCnt,
+ natural_t *result,
+ io_object_t *notification )
+{
+ kern_return_t kr;
+ vm_offset_t data;
+
+ kr = vm_map_copyout( kernel_map, &data, (vm_map_copy_t) matching );
+
+ if( KERN_SUCCESS == kr) {
+ // must return success after vm_map_copyout() succeeds
+ *result = is_io_service_add_notification( master_port, notification_type,
+ (char *) data, wake_port, reference, referenceCnt, notification );
+ vm_deallocate( kernel_map, data, matchingCnt );
+ }
+
+ return( kr );
+}
+
+