LCOV - code coverage report
Current view: top level - home/alexey/klever/native-scheduler-work-dir/native-scheduler-work-dir/scheduler/jobs/032ed983781f2acce615a4df71b22f31/klever-core-work-dir/929d281/linux-drivers-clk2/avtg/drivers/scsi/sr_mod.ko/linux:drivers:clk2/weaver - sr.c.aux (source / functions) Hit Total Coverage
Test: coverage.info Lines: 282 288 97.9 %
Date: 2017-01-25 Functions: 40 40 100.0 %

          Line data    Source code
       1             : 
       2             : struct device;
       3             : 
       4             : void *ldv_dev_get_drvdata(const struct device *dev);
       5             : int ldv_dev_set_drvdata(struct device *dev, void *data);
       6             : 
       7             : struct spi_master;
       8             : struct device;
       9             : struct spi_master *ldv_spi_alloc_master(struct device *host, unsigned size);
      10             : 
      11             : #include <linux/ldv/err.h>
      12             : 
      13             : #include <linux/types.h>
      14             : void *ldv_kzalloc(size_t size, gfp_t flags);
      15             : 
      16             : struct clk;
      17             : 
      18             : extern void ldv_clk_disable(struct clk *clk);
      19             : extern int ldv_clk_enable(void);
      20             : 
      21             : #include <linux/ldv/common.h>
      22             : #include <linux/ldv/irq.h>
      23             : #include <verifier/common.h>
      24             : #include <verifier/nondet.h>
      25             : #include <verifier/memory.h>
      26             : #include <verifier/thread.h>
      27             : 
      28             : #include <linux/device.h>
      29             : 
      30             : 
      31             : struct ldv_struct_insmod_4 {
      32             :  int signal_pending;
      33             : };
      34           1 : 
      35             : struct ldv_struct_partially_ordered_scenario_1 {
      36             :  struct device_driver *arg0;
      37             :  int signal_pending;
      38             : };
      39             : 
      40             : /* EMG Function declarations */
      41             : void ldv_dispatch_default_deregister_4_4_4(void);
      42             : void ldv_dispatch_default_deregister_5_4_5(void);
      43             : void ldv_dispatch_default_register_4_4_7(void);
      44             : void ldv_dispatch_default_register_5_4_6(void);
      45             : void ldv_dispatch_deregister_5_1(struct device_driver *);
      46             : void ldv_dispatch_insmod_deregister_7_2(void);
      47             : void ldv_dispatch_insmod_register_7_3(void);
      48             : void ldv_dispatch_register_6_3(struct device_driver *);
      49             : void ldv_emg_driver_unregister(struct device_driver *);
      50             : int ldv_emg_scsi_register_driver(struct device_driver *);
      51             : void ldv_insmod_4(void *);
      52             : void ldv_insmod_exit_sr_4_2(void (*)(void));
      53             : int ldv_insmod_init_sr_4_11(int (*)(void));
      54             : void ldv_main_7(void *);
      55             : void ldv_partially_ordered_scenario_1(void *);
      56             : void ldv_partially_ordered_scenario_2(void *);
      57             : void ldv_partially_ordered_scenario_callback_1_18(int (*)(struct block_device *, fmode_t , unsigned int, long unsigned int), struct block_device *, unsigned int, unsigned int, long unsigned int);
      58             : void ldv_partially_ordered_scenario_callback_1_21(int (*)(struct gendisk *), struct gendisk *);
      59             : void ldv_partially_ordered_scenario_callback_1_4(int (*)(struct scsi_cmnd *), struct scsi_cmnd *);
      60             : void ldv_partially_ordered_scenario_callback_2_19(int (*)(struct cdrom_device_info *, int), struct cdrom_device_info *, int);
      61             : void ldv_partially_ordered_scenario_callback_2_22(int (*)(struct cdrom_device_info *, struct packet_command *), struct cdrom_device_info *, struct packet_command *);
      62             : void ldv_partially_ordered_scenario_callback_2_23(int (*)(struct cdrom_device_info *, struct cdrom_multisession *), struct cdrom_device_info *, struct cdrom_multisession *);
      63             : void ldv_partially_ordered_scenario_callback_2_24(int (*)(struct cdrom_device_info *, struct cdrom_mcn *), struct cdrom_device_info *, struct cdrom_mcn *);
      64             : void ldv_partially_ordered_scenario_callback_2_25(int (*)(struct cdrom_device_info *, int), struct cdrom_device_info *, int);
      65             : void ldv_partially_ordered_scenario_callback_2_28(int (*)(struct cdrom_device_info *, int), struct cdrom_device_info *, int);
      66             : void ldv_partially_ordered_scenario_callback_2_31(int (*)(struct cdrom_device_info *), struct cdrom_device_info *);
      67             : void ldv_partially_ordered_scenario_callback_2_32(int (*)(struct cdrom_device_info *, int), struct cdrom_device_info *, int);
      68             : void ldv_partially_ordered_scenario_callback_2_35(int (*)(struct cdrom_device_info *, int), struct cdrom_device_info *, int);
      69             : void ldv_partially_ordered_scenario_callback_2_4(int (*)(struct cdrom_device_info *, unsigned int, void *), struct cdrom_device_info *, unsigned int, void *);
      70             : int ldv_partially_ordered_scenario_probe_1_11(int (*)(struct device *), struct device *);
      71             : int ldv_partially_ordered_scenario_probe_1_22(int (*)(struct block_device *, fmode_t ), struct block_device *, unsigned int);
      72             : int ldv_partially_ordered_scenario_probe_2_12(int (*)(struct cdrom_device_info *, int), struct cdrom_device_info *, int);
      73             : void ldv_partially_ordered_scenario_release_1_15(int (*)(struct gendisk *, fmode_t ), struct gendisk *, unsigned int);
      74             : void ldv_partially_ordered_scenario_release_1_2(int (*)(struct device *), struct device *);
      75             : void ldv_partially_ordered_scenario_release_2_2(void (*)(struct cdrom_device_info *), struct cdrom_device_info *);
      76             : extern void ldv_random_containerless_scenario_3(void *);
      77             : int main(void);
      78             : 
      79             : /* EMG variable declarations */
      80           1 : struct ldv_thread ldv_thread_1;
      81           1 : struct ldv_thread ldv_thread_2;
      82           1 : struct ldv_thread ldv_thread_4;
      83           1 : struct ldv_thread ldv_thread_7;
      84             : 
      85             : /* EMG variable initialization */
      86             : 
      87             : /* EMG function definitions */
      88             : /* AUX_FUNC ldv_dispatch_default_deregister_4_4_4 */
      89             : void ldv_dispatch_default_deregister_4_4_4() {
      90             :  struct ldv_struct_insmod_4 *cf_arg_2;
      91             :  /* Skip thread join call */
      92           1 :  return;
      93             : }
      94             : 
      95             : /* AUX_FUNC ldv_dispatch_default_deregister_5_4_5 */
      96             : void ldv_dispatch_default_deregister_5_4_5() {
      97             :  struct ldv_struct_insmod_4 *cf_arg_3;
      98             :  /* Skip thread join call */
      99           1 :  return;
     100             : }
     101             : 
     102             : /* AUX_FUNC ldv_dispatch_default_register_4_4_7 */
     103             : void ldv_dispatch_default_register_4_4_7() {
     104             :  struct ldv_struct_insmod_4 *cf_arg_2;
     105           4 :  cf_arg_2 = ldv_xmalloc(sizeof(struct ldv_struct_insmod_4));
     106           3 :  ldv_partially_ordered_scenario_2(cf_arg_2);
     107           1 :  return;
     108             : }
     109             : 
     110             : /* AUX_FUNC ldv_dispatch_default_register_5_4_6 */
     111             : void ldv_dispatch_default_register_5_4_6() {
     112             :  struct ldv_struct_insmod_4 *cf_arg_3;
     113           4 :  cf_arg_3 = ldv_xmalloc(sizeof(struct ldv_struct_insmod_4));
     114           3 :  ldv_random_containerless_scenario_3(cf_arg_3);
     115           1 :  return;
     116             : }
     117             : 
     118             : /* AUX_FUNC ldv_dispatch_deregister_5_1 */
     119             : void ldv_dispatch_deregister_5_1(struct device_driver *arg0) {
     120             :  struct ldv_struct_partially_ordered_scenario_1 *cf_arg_1;
     121             :  /* Skip thread join call */
     122           2 :  return;
     123             : }
     124             : 
     125             : /* AUX_FUNC ldv_dispatch_insmod_deregister_7_2 */
     126             : void ldv_dispatch_insmod_deregister_7_2() {
     127             :  struct ldv_struct_insmod_4 *cf_arg_4;
     128             :  /* Skip thread join call */
     129           1 :  return;
     130             : }
     131             : 
     132             : /* AUX_FUNC ldv_dispatch_insmod_register_7_3 */
     133             : void ldv_dispatch_insmod_register_7_3() {
     134             :  struct ldv_struct_insmod_4 *cf_arg_4;
     135           4 :  cf_arg_4 = ldv_xmalloc(sizeof(struct ldv_struct_insmod_4));
     136           4 :  ldv_insmod_4(cf_arg_4);
     137           1 :  return;
     138             : }
     139             : 
     140             : /* AUX_FUNC ldv_dispatch_register_6_3 */
     141             : void ldv_dispatch_register_6_3(struct device_driver *arg0) {
     142             :  struct ldv_struct_partially_ordered_scenario_1 *cf_arg_1;
     143           4 :  cf_arg_1 = ldv_xmalloc(sizeof(struct ldv_struct_partially_ordered_scenario_1));
     144           2 :  cf_arg_1->arg0 = arg0;
     145           2 :  ldv_partially_ordered_scenario_1(cf_arg_1);
     146           1 :  return;
     147             : }
     148             : 
     149             : /* AUX_FUNC ldv_emg_driver_unregister */
     150             : void ldv_emg_driver_unregister(struct device_driver *arg0) {
     151             :  /* LDV {"comment": "Control function 'driver_unregister'", "type": "CONTROL_FUNCTION_BEGIN", "function": "ldv_emg_driver_unregister"} */
     152           2 :  /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
     153             :  struct device_driver *ldv_5_device_driver_device_driver;
     154             :  /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
     155             :  /* LDV {"action": "ASSIGN", "type": "CONDITION_BEGIN", "comment": "Get 'device_driver' callbacks to deregister."} */
     156           2 :  ldv_5_device_driver_device_driver = arg0;
     157             :  /* LDV {"action": "ASSIGN", "type": "CONDITION_END"} */
     158             : 
     159             :  /* LDV {"action": "DEREGISTER", "type": "DISPATCH_BEGIN", "comment": "Deregister DEVICE_DRIVER callbacks."} */
     160           4 :  ldv_dispatch_deregister_5_1(ldv_5_device_driver_device_driver);
     161             :  /* LDV {"action": "DEREGISTER", "type": "DISPATCH_END"} */
     162             : 
     163             :  /* Exit function at a terminal state */
     164           2 :  return;
     165             :  /* End of the process */
     166             :  return;
     167             :  /* LDV {"comment": "End of control function based on process 'driver_unregister'", "type": "CONTROL_FUNCTION_END", "function": "ldv_emg_driver_unregister"} */
     168             : }
     169             : 
     170             : /* AUX_FUNC ldv_emg_scsi_register_driver */
     171             : int ldv_emg_scsi_register_driver(struct device_driver *arg0) {
     172             :  /* LDV {"comment": "Control function 'scsi_register_driver'", "type": "CONTROL_FUNCTION_BEGIN", "function": "ldv_emg_scsi_register_driver"} */
     173           1 :  /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
     174           1 :  struct device_driver *ldv_6_device_driver_device_driver;
     175           1 :  /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
     176             :  /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
     177             : 
     178           4 :  if (ldv_undef_int()) {
     179             :   /* LDV {"action": "ASSIGN", "type": "CONDITION_BEGIN", "comment": "Get 'device_driver' callbacks to register."} */
     180           1 :   ldv_6_device_driver_device_driver = arg0;
     181             :   /* LDV {"action": "ASSIGN", "type": "CONDITION_END"} */
     182             : 
     183             :   /* LDV {"action": "REGISTER", "type": "DISPATCH_BEGIN", "comment": "Register DEVICE_DRIVER callbacks."} */
     184           2 :   ldv_dispatch_register_6_3(ldv_6_device_driver_device_driver);
     185             :   /* LDV {"action": "REGISTER", "type": "DISPATCH_END"} */
     186             : 
     187             :   /* LDV {"action": "FAIL", "type": "CONDITION_BEGIN", "comment": "Fail registration of 'device_driver' callbacks."} */
     188           3 :   return ldv_undef_int_negative();
     189             :   /* LDV {"action": "FAIL", "type": "CONDITION_END"} */
     190             : 
     191             :   /* Exit function at a terminal state */
     192             :  }
     193             :  else {
     194             :   /* LDV {"action": "SUCCESS", "type": "CONDITION_BEGIN", "comment": "Registration of 'device_driver' callbacks has been successful."} */
     195           1 :   return 0;
     196             :   /* LDV {"action": "SUCCESS", "type": "CONDITION_END"} */
     197             : 
     198             :   /* Exit function at a terminal state */
     199             :  }
     200             :  /* End of the process */
     201             :  /* LDV {"comment": "End of control function based on process 'scsi_register_driver'", "type": "CONTROL_FUNCTION_END", "function": "ldv_emg_scsi_register_driver"} */
     202             : }
     203             : 
     204             : /* AUX_FUNC ldv_insmod_4 */
     205             : void ldv_insmod_4(void *arg0) {
     206             :  /* LDV {"thread": 4, "type": "CONTROL_FUNCTION_BEGIN", "comment": "Control function 'insmod(artificial)'", "function": "ldv_insmod_4"} */
     207           1 :  /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
     208           1 :  void (*ldv_4_exit_sr_default)(void);
     209           1 :  int (*ldv_4_init_sr_default)(void);
     210           1 :  int ldv_4_ret_default;
     211           1 :  /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
     212             :  /* LDV {"action": "INSMOD_REGISTER", "type": "RECEIVE_BEGIN", "comment": "Trigger module initialization."} */
     213           2 :  ldv_free(arg0);
     214             :  /* LDV {"action": "INSMOD_REGISTER", "type": "RECEIVE_END"} */
     215             : 
     216             :  /* LDV {"action": "INIT_SR", "type": "CALL_BEGIN", "callback": true, "comment": "Initialize the module after insmod with 'init_sr' function. Invoke callback init_sr from ARTIFICIAL."} */
     217             :  /* LDV {"type": "CALLBACK", "call": "ldv_4_ret_default = (init_sr)();", "comment": "init_sr"} */
     218           2 :  ldv_4_ret_default = ldv_insmod_init_sr_4_11(ldv_4_init_sr_default);
     219             :  /* Callback post-call */
     220           2 :  ldv_4_ret_default = ldv_post_init(ldv_4_ret_default);
     221             :  /* LDV {"action": "INIT_SR", "type": "CALL_END"} */
     222             : 
     223           4 :  if (ldv_undef_int()) {
     224             :   /* LDV {"action": "INIT_FAILED", "type": "CONDITION_BEGIN", "comment": "Failed to initialize the module."} */
     225           2 :   ldv_assume(ldv_4_ret_default != 0);
     226             :   /* LDV {"action": "INIT_FAILED", "type": "CONDITION_END"} */
     227             : 
     228             :   /* LDV {"action": "INSMOD_DEREGISTER", "type": "RECEIVE_BEGIN", "comment": "Trigger module exit."} */
     229             :   /* Skip a non-replicative signal receiving */
     230             :   /* LDV {"action": "INSMOD_DEREGISTER", "type": "RECEIVE_END"} */
     231             : 
     232             :   /* Exit function at a terminal state */
     233           1 :   return;
     234             :  }
     235             :  else {
     236             :   /* LDV {"action": "INIT_SUCCESS", "type": "CONDITION_BEGIN", "comment": "Module has been initialized."} */
     237           2 :   ldv_assume(ldv_4_ret_default == 0);
     238             :   /* LDV {"action": "INIT_SUCCESS", "type": "CONDITION_END"} */
     239             : 
     240           4 :   if (ldv_undef_int()) {
     241             :    /* LDV {"action": "DEFAULT_REGISTER_4", "type": "DISPATCH_BEGIN", "comment": "Register 'STRUCT_CDROM_DEVICE_OPS' callbacks with unknown registration function."} */
     242           2 :    ldv_dispatch_default_register_4_4_7();
     243             :    /* LDV {"action": "DEFAULT_REGISTER_4", "type": "DISPATCH_END"} */
     244             : 
     245             :    /* LDV {"action": "DEFAULT_REGISTER_5", "type": "DISPATCH_BEGIN", "comment": "Register 'STRUCT_KERNEL_PARAM' callbacks with unknown registration function."} */
     246           2 :    ldv_dispatch_default_register_5_4_6();
     247             :    /* LDV {"action": "DEFAULT_REGISTER_5", "type": "DISPATCH_END"} */
     248             : 
     249             :    /* LDV {"action": "DEFAULT_DEREGISTER_5", "type": "DISPATCH_BEGIN", "comment": "Deregister 'STRUCT_KERNEL_PARAM' callbacks with unknown deregistration function."} */
     250           2 :    ldv_dispatch_default_deregister_5_4_5();
     251             :    /* LDV {"action": "DEFAULT_DEREGISTER_5", "type": "DISPATCH_END"} */
     252             : 
     253             :    /* LDV {"action": "DEFAULT_DEREGISTER_4", "type": "DISPATCH_BEGIN", "comment": "Deregister 'STRUCT_CDROM_DEVICE_OPS' callbacks with unknown deregistration function."} */
     254           2 :    ldv_dispatch_default_deregister_4_4_4();
     255             :    /* LDV {"action": "DEFAULT_DEREGISTER_4", "type": "DISPATCH_END"} */
     256             : 
     257             :   }
     258             :   else {
     259             :    /* LDV {"action": "NONE", "type": "CONDITION_BEGIN", "comment": "Skip default callbacks registrations and deregistrations."} */
     260             :    /* LDV {"action": "NONE", "type": "CONDITION_END"} */
     261             : 
     262             :   }
     263             :   /* LDV {"action": "EXIT_SR", "type": "CALL_BEGIN", "callback": true, "comment": "Exit the module before its unloading with 'exit_sr' function. Invoke callback exit_sr from ARTIFICIAL."} */
     264             :   /* LDV {"type": "CALLBACK", "call": "(exit_sr)();", "comment": "exit_sr"} */
     265           4 :   ldv_insmod_exit_sr_4_2(ldv_4_exit_sr_default);
     266             :   /* LDV {"action": "EXIT_SR", "type": "CALL_END"} */
     267             : 
     268             :   /* LDV {"action": "INSMOD_DEREGISTER", "type": "RECEIVE_BEGIN", "comment": "Trigger module exit."} */
     269             :   /* Skip a non-replicative signal receiving */
     270             :   /* LDV {"action": "INSMOD_DEREGISTER", "type": "RECEIVE_END"} */
     271             : 
     272             :   /* Exit function at a terminal state */
     273           1 :   return;
     274             :  }
     275             :  /* End of the process */
     276             :  return;
     277             :  /* LDV {"comment": "End of control function based on process 'insmod(artificial)'", "type": "CONTROL_FUNCTION_END", "function": "ldv_insmod_4"} */
     278             : }
     279             : 
     280             : /* AUX_FUNC_CALLBACK ldv_insmod_exit_sr_4_2 */
     281             : void ldv_insmod_exit_sr_4_2(void (*arg0)(void)) {
     282           4 :  (exit_sr)();
     283           2 : }
     284             : 
     285             : /* AUX_FUNC_CALLBACK ldv_insmod_init_sr_4_11 */
     286             : int ldv_insmod_init_sr_4_11(int (*arg0)(void)) {
     287           4 :  return (init_sr)();
     288           1 : }
     289             : 
     290             : /* AUX_FUNC ldv_main_7 */
     291             : void ldv_main_7(void *arg0) {
     292             :  /* LDV {"thread": 7, "type": "CONTROL_FUNCTION_BEGIN", "comment": "Control function 'main(main)'", "function": "ldv_main_7"} */
     293             :  /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
     294             :  /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
     295             :  /* LDV {"action": "INIT", "type": "CONDITION_BEGIN", "comment": "Initialize rule models."} */
     296           1 :  ldv_initialize();
     297             :  /* LDV {"action": "INIT", "type": "CONDITION_END"} */
     298             : 
     299             :  /* LDV {"action": "INSMOD_REGISTER", "type": "DISPATCH_BEGIN", "comment": "Start environment model scenarios."} */
     300           2 :  ldv_dispatch_insmod_register_7_3();
     301             :  /* LDV {"action": "INSMOD_REGISTER", "type": "DISPATCH_END"} */
     302             : 
     303             :  /* LDV {"action": "INSMOD_DEREGISTER", "type": "DISPATCH_BEGIN", "comment": "Stop environment model scenarios."} */
     304           2 :  ldv_dispatch_insmod_deregister_7_2();
     305             :  /* LDV {"action": "INSMOD_DEREGISTER", "type": "DISPATCH_END"} */
     306             : 
     307             :  /* LDV {"action": "FINAL", "type": "CONDITION_BEGIN", "comment": "Check rule model state at the exit."} */
     308           1 :  ldv_check_final_state();
     309           1 :  ldv_stop();
     310             :  /* LDV {"action": "FINAL", "type": "CONDITION_END"} */
     311             : 
     312             :  /* Exit function at a terminal state */
     313           0 :  return;
     314             :  /* End of the process */
     315             :  return;
     316             :  /* LDV {"comment": "End of control function based on process 'main(main)'", "type": "CONTROL_FUNCTION_END", "function": "ldv_main_7"} */
     317             : }
     318             : 
     319             : /* AUX_FUNC ldv_partially_ordered_scenario_1 */
     320             : void ldv_partially_ordered_scenario_1(void *arg0) {
     321             :  /* LDV {"thread": 1, "type": "CONTROL_FUNCTION_BEGIN", "comment": "Control function 'partially_ordered_scenario(device_driver)'", "function": "ldv_partially_ordered_scenario_1"} */
     322           1 :  /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
     323           1 :  int (*ldv_1_callback_done)(struct scsi_cmnd *);
     324             :  int (*ldv_1_callback_locked_ioctl)(struct block_device *, fmode_t , unsigned int, long unsigned int);
     325           1 :  int (*ldv_1_callback_media_changed)(struct gendisk *);
     326           1 :  struct device_driver *ldv_1_container_device_driver;
     327           1 :  struct block_device_operations *ldv_1_container_struct_block_device_operations;
     328           1 :  unsigned int ldv_1_ldv_param_15_1_default;
     329           1 :  unsigned int ldv_1_ldv_param_18_1_default;
     330           1 :  unsigned int ldv_1_ldv_param_18_2_default;
     331           1 :  long unsigned int ldv_1_ldv_param_18_3_default;
     332           1 :  unsigned int ldv_1_ldv_param_22_1_default;
     333           1 :  struct block_device *ldv_1_resource_struct_block_device_ptr;
     334           1 :  struct device *ldv_1_resource_struct_device_ptr;
     335           1 :  struct gendisk *ldv_1_resource_struct_gendisk_ptr;
     336           1 :  struct scsi_cmnd *ldv_1_resource_struct_scsi_cmnd_ptr;
     337           1 :  int ldv_1_ret_default;
     338           1 :  /* Received labels */
     339           2 :  struct ldv_struct_partially_ordered_scenario_1 *data = (struct ldv_struct_partially_ordered_scenario_1*) arg0;
     340           1 : 
     341           1 :  /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
     342           1 :  /* Initialize automaton variables */
     343           2 :  ldv_1_ret_default = 1;
     344           1 :  /* LDV {"action": "REGISTER", "type": "RECEIVE_BEGIN", "comment": "Begin DEVICE_DRIVER callbacks invocations scenario."} */
     345           1 :  /* Assign recieved labels */
     346           3 :  if (data) {
     347           1 :   ldv_1_container_device_driver = data->arg0;
     348           2 :   ldv_free(data);
     349             :  }
     350             :  /* LDV {"action": "REGISTER", "type": "RECEIVE_END"} */
     351             : 
     352             :  /* LDV {"action": "INIT", "type": "CONDITION_BEGIN", "comment": "Alloc memory for common callback arguments."} */
     353           5 :  ldv_1_resource_struct_block_device_ptr = ldv_xmalloc_unknown_size(0);
     354           3 :  ldv_1_resource_struct_device_ptr = ldv_xmalloc_unknown_size(0);
     355           3 :  ldv_1_resource_struct_gendisk_ptr = ldv_xmalloc_unknown_size(0);
     356           3 :  ldv_1_resource_struct_scsi_cmnd_ptr = ldv_xmalloc_unknown_size(0);
     357             :  /* LDV {"action": "INIT", "type": "CONDITION_END"} */
     358             : 
     359             :  /* LDV {"action": "MAIN", "type": "SUBPROCESS_BEGIN", "comment": "Start with an initialization callback."} */
     360             :  /* LDV {"action": "MAIN", "type": "SUBPROCESS_END"} */
     361             : 
     362             :  /* Jump to a subprocess 'main' initial state */
     363           1 :  goto ldv_main_1;
     364             :  /* End of the process */
     365             :  return;
     366           1 : 
     367             :  /* Sbprocess main */
     368             :  ldv_main_1:
     369             :  /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
     370             : 
     371           4 :  if (ldv_undef_int()) {
     372             :   /* LDV {"action": "FREE", "type": "CONDITION_BEGIN", "comment": "Free memory for common callback arguments."} */
     373           2 :   ldv_free(ldv_1_resource_struct_block_device_ptr);
     374           2 :   ldv_free(ldv_1_resource_struct_device_ptr);
     375           2 :   ldv_free(ldv_1_resource_struct_gendisk_ptr);
     376           2 :   ldv_free(ldv_1_resource_struct_scsi_cmnd_ptr);
     377             :   /* LDV {"action": "FREE", "type": "CONDITION_END"} */
     378             : 
     379             :   /* LDV {"action": "DEREGISTER", "type": "RECEIVE_BEGIN", "comment": "Finish DEVICE_DRIVER callbacks invocations scenario."} */
     380             :   /* Skip a non-replicative signal receiving */
     381             :   /* LDV {"action": "DEREGISTER", "type": "RECEIVE_END"} */
     382             : 
     383             :   /* Exit function at a terminal state */
     384           1 :   return;
     385             :  }
     386             :  else {
     387           4 :   if (ldv_undef_int()) {
     388             :    /* LDV {"action": "PRE_CALL_22", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
     389             :    /* LDV {"action": "PRE_CALL_22", "type": "CONDITION_END"} */
     390             : 
     391             :    /* LDV {"action": "PROBE", "type": "CALL_BEGIN", "callback": true, "comment": "Call an initialization callback. Invoke callback open from block_device_operations."} */
     392             :    /* LDV {"type": "CALLBACK", "call": "ldv_1_ret_default = ((& sr_block_open))(ldv_1_resource_struct_block_device_ptr, ldv_1_ldv_param_22_1_default);", "comment": "probe"} */
     393           2 :    ldv_1_ret_default = ldv_partially_ordered_scenario_probe_1_22(ldv_1_container_struct_block_device_operations->open, ldv_1_resource_struct_block_device_ptr, ldv_1_ldv_param_22_1_default);
     394             :    /* Callback post-call */
     395           2 :    ldv_1_ret_default = ldv_filter_err_code(ldv_1_ret_default);
     396             :    /* LDV {"action": "PROBE", "type": "CALL_END"} */
     397             : 
     398             :    /* LDV {"action": "POST_CALL_22", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
     399             :    /* LDV {"action": "POST_CALL_22", "type": "CONDITION_END"} */
     400             : 
     401             :   }
     402             :   else {
     403             :    /* LDV {"action": "PROBE", "type": "CALL_BEGIN", "callback": true, "comment": "Call an initialization callback. Invoke callback probe from device_driver."} */
     404             :    /* LDV {"type": "CALLBACK", "call": "ldv_1_ret_default = ((& sr_probe))(ldv_1_resource_struct_device_ptr);", "comment": "probe"} */
     405           2 :    ldv_1_ret_default = ldv_partially_ordered_scenario_probe_1_11(ldv_1_container_device_driver->probe, ldv_1_resource_struct_device_ptr);
     406             :    /* Callback post-call */
     407           2 :    ldv_1_ret_default = ldv_filter_err_code(ldv_1_ret_default);
     408             :    /* LDV {"action": "PROBE", "type": "CALL_END"} */
     409             : 
     410             :   }
     411             :   /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
     412             : 
     413           6 :   if (ldv_undef_int()) {
     414             :    /* LDV {"action": "Y_RET", "type": "CONDITION_BEGIN", "comment": "Initialization has been successful."} */
     415           2 :    ldv_assume(ldv_1_ret_default == 0);
     416             :    /* LDV {"action": "Y_RET", "type": "CONDITION_END"} */
     417             : 
     418             :    /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Initializations are done, proceed to the other callbacks."} */
     419             :    /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
     420             : 
     421             :    /* Jump to a subprocess 'call' initial state */
     422           1 :    goto ldv_call_1;
     423             :   }
     424             :   else {
     425             :    /* LDV {"action": "N_RET", "type": "CONDITION_BEGIN", "comment": "Initialization has failed."} */
     426           2 :    ldv_assume(ldv_1_ret_default != 0);
     427             :    /* LDV {"action": "N_RET", "type": "CONDITION_END"} */
     428             : 
     429             :    /* LDV {"action": "MAIN", "type": "SUBPROCESS_BEGIN", "comment": "Start with an initialization callback."} */
     430             :    /* LDV {"action": "MAIN", "type": "SUBPROCESS_END"} */
     431             : 
     432             :    /* Jump to a subprocess 'main' initial state */
     433           1 :    goto ldv_main_1;
     434             :   }
     435             :  }
     436             :  /* End of the subprocess 'main' */
     437             :  return;
     438           1 : 
     439             :  /* Sbprocess call */
     440             :  ldv_call_1:
     441             :  /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
     442             : 
     443           2 :  switch (ldv_undef_int()) {
     444           3 :   case 1: {
     445             :    /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback media_changed from block_device_operations."} */
     446             :    /* LDV {"type": "CALLBACK", "call": "((& sr_block_media_changed))(ldv_1_resource_struct_gendisk_ptr);", "comment": "callback"} */
     447           2 :    ldv_partially_ordered_scenario_callback_1_21(ldv_1_callback_media_changed, ldv_1_resource_struct_gendisk_ptr);
     448             :    /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
     449             : 
     450             :    /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Initializations are done, proceed to the other callbacks."} */
     451             :    /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
     452             : 
     453             :    /* Jump to a subprocess 'call' initial state */
     454           1 :    goto ldv_call_1;
     455           1 :    break;
     456             :   }
     457           3 :   case 2: {
     458             :    /* LDV {"action": "PRE_CALL_18", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
     459             :    /* LDV {"action": "PRE_CALL_18", "type": "CONDITION_END"} */
     460             : 
     461             :    /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback locked_ioctl from block_device_operations."} */
     462             :    /* LDV {"type": "CALLBACK", "call": "((& sr_block_ioctl))(ldv_1_resource_struct_block_device_ptr, ldv_1_ldv_param_18_1_default, ldv_1_ldv_param_18_2_default, ldv_1_ldv_param_18_3_default);", "comment": "callback"} */
     463           2 :    ldv_partially_ordered_scenario_callback_1_18(ldv_1_callback_locked_ioctl, ldv_1_resource_struct_block_device_ptr, ldv_1_ldv_param_18_1_default, ldv_1_ldv_param_18_2_default, ldv_1_ldv_param_18_3_default);
     464             :    /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
     465             : 
     466             :    /* LDV {"action": "POST_CALL_18", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
     467             :    /* LDV {"action": "POST_CALL_18", "type": "CONDITION_END"} */
     468             : 
     469             :    /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Initializations are done, proceed to the other callbacks."} */
     470             :    /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
     471             : 
     472             :    /* Jump to a subprocess 'call' initial state */
     473           1 :    goto ldv_call_1;
     474             :    /* Jump to a subprocess 'call' initial state */
     475             :    goto ldv_call_1;
     476           1 :    break;
     477             :   }
     478           3 :   case 3: {
     479             :    /* LDV {"action": "PRE_CALL_15", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
     480             :    /* LDV {"action": "PRE_CALL_15", "type": "CONDITION_END"} */
     481             : 
     482             :    /* LDV {"action": "RELEASE", "type": "CALL_BEGIN", "callback": true, "comment": "Do uninitializations before deregistration. Invoke callback release from block_device_operations."} */
     483             :    /* LDV {"type": "CALLBACK", "call": "((& sr_block_release))(ldv_1_resource_struct_gendisk_ptr, ldv_1_ldv_param_15_1_default);", "comment": "release"} */
     484           2 :    ldv_partially_ordered_scenario_release_1_15(ldv_1_container_struct_block_device_operations->release, ldv_1_resource_struct_gendisk_ptr, ldv_1_ldv_param_15_1_default);
     485             :    /* LDV {"action": "RELEASE", "type": "CALL_END"} */
     486             : 
     487             :    /* LDV {"action": "POST_CALL_15", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
     488             :    /* LDV {"action": "POST_CALL_15", "type": "CONDITION_END"} */
     489             : 
     490             :    /* LDV {"action": "MAIN", "type": "SUBPROCESS_BEGIN", "comment": "Start with an initialization callback."} */
     491             :    /* LDV {"action": "MAIN", "type": "SUBPROCESS_END"} */
     492             : 
     493             :    /* Jump to a subprocess 'main' initial state */
     494           1 :    goto ldv_main_1;
     495           1 :    break;
     496             :   }
     497           3 :   case 4: {
     498             :    /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback done from scsi_driver."} */
     499             :    /* LDV {"type": "CALLBACK", "call": "((& sr_done))(ldv_1_resource_struct_scsi_cmnd_ptr);", "comment": "callback"} */
     500           2 :    ldv_partially_ordered_scenario_callback_1_4(ldv_1_callback_done, ldv_1_resource_struct_scsi_cmnd_ptr);
     501             :    /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
     502             : 
     503             :    /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Initializations are done, proceed to the other callbacks."} */
     504             :    /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
     505             : 
     506             :    /* Jump to a subprocess 'call' initial state */
     507           1 :    goto ldv_call_1;
     508             :    /* Jump to a subprocess 'call' initial state */
     509             :    goto ldv_call_1;
     510             :    /* Jump to a subprocess 'call' initial state */
     511             :    goto ldv_call_1;
     512           1 :    break;
     513             :   }
     514           3 :   case 5: {
     515             :    /* LDV {"action": "RELEASE", "type": "CALL_BEGIN", "callback": true, "comment": "Do uninitializations before deregistration. Invoke callback remove from device_driver."} */
     516             :    /* LDV {"type": "CALLBACK", "call": "((& sr_remove))(ldv_1_resource_struct_device_ptr);", "comment": "release"} */
     517           2 :    ldv_partially_ordered_scenario_release_1_2(ldv_1_container_device_driver->remove, ldv_1_resource_struct_device_ptr);
     518             :    /* LDV {"action": "RELEASE", "type": "CALL_END"} */
     519             : 
     520             :    /* LDV {"action": "MAIN", "type": "SUBPROCESS_BEGIN", "comment": "Start with an initialization callback."} */
     521             :    /* LDV {"action": "MAIN", "type": "SUBPROCESS_END"} */
     522             : 
     523             :    /* Jump to a subprocess 'main' initial state */
     524           1 :    goto ldv_main_1;
     525             :    /* Jump to a subprocess 'main' initial state */
     526             :    goto ldv_main_1;
     527           1 :    break;
     528             :   }
     529           2 :   default: ldv_stop();
     530           1 :  }
     531           0 :  /* End of the subprocess 'call' */
     532           0 :  return;
     533             :  /* LDV {"comment": "End of control function based on process 'partially_ordered_scenario(device_driver)'", "type": "CONTROL_FUNCTION_END", "function": "ldv_partially_ordered_scenario_1"} */
     534             : }
     535             : 
     536             : /* AUX_FUNC ldv_partially_ordered_scenario_2 */
     537             : void ldv_partially_ordered_scenario_2(void *arg0) {
     538             :  /* LDV {"thread": 2, "type": "CONTROL_FUNCTION_BEGIN", "comment": "Control function 'partially_ordered_scenario(struct_cdrom_device_ops)'", "function": "ldv_partially_ordered_scenario_2"} */
     539           1 :  /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
     540           1 :  int (*ldv_2_callback_audio_ioctl)(struct cdrom_device_info *, unsigned int, void *);
     541           1 :  int (*ldv_2_callback_drive_status)(struct cdrom_device_info *, int);
     542           1 :  int (*ldv_2_callback_generic_packet)(struct cdrom_device_info *, struct packet_command *);
     543           1 :  int (*ldv_2_callback_get_last_session)(struct cdrom_device_info *, struct cdrom_multisession *);
     544           1 :  int (*ldv_2_callback_get_mcn)(struct cdrom_device_info *, struct cdrom_mcn *);
     545           1 :  int (*ldv_2_callback_lock_door)(struct cdrom_device_info *, int);
     546           1 :  int (*ldv_2_callback_media_changed)(struct cdrom_device_info *, int);
     547           1 :  int (*ldv_2_callback_reset)(struct cdrom_device_info *);
     548           1 :  int (*ldv_2_callback_select_speed)(struct cdrom_device_info *, int);
     549           1 :  int (*ldv_2_callback_tray_move)(struct cdrom_device_info *, int);
     550           1 :  struct cdrom_device_ops *ldv_2_container_struct_cdrom_device_ops;
     551           1 :  int ldv_2_ldv_param_12_1_default;
     552           1 :  int ldv_2_ldv_param_19_1_default;
     553           1 :  int ldv_2_ldv_param_25_1_default;
     554           1 :  int ldv_2_ldv_param_28_1_default;
     555           1 :  int ldv_2_ldv_param_32_1_default;
     556           1 :  int ldv_2_ldv_param_35_1_default;
     557           1 :  unsigned int ldv_2_ldv_param_4_1_default;
     558           1 :  struct cdrom_device_info *ldv_2_resource_struct_cdrom_device_info_ptr;
     559           1 :  struct cdrom_mcn *ldv_2_resource_struct_cdrom_mcn_ptr;
     560           1 :  struct cdrom_multisession *ldv_2_resource_struct_cdrom_multisession_ptr;
     561           1 :  struct packet_command *ldv_2_resource_struct_packet_command_ptr;
     562           1 :  int ldv_2_ret_default;
     563           1 :  /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
     564           1 :  /* Initialize automaton variables */
     565           2 :  ldv_2_ret_default = 1;
     566           1 :  /* LDV {"action": "DEFAULT_REGISTER_4", "type": "RECEIVE_BEGIN", "comment": "Begin STRUCT_CDROM_DEVICE_OPS callbacks invocations scenario."} */
     567           3 :  ldv_free(arg0);
     568           1 :  /* LDV {"action": "DEFAULT_REGISTER_4", "type": "RECEIVE_END"} */
     569           1 : 
     570           1 :  /* LDV {"action": "DEFAULT_ALLOC_4", "type": "CONDITION_BEGIN", "comment": "Allocate memory after default registration."} */
     571           3 :  ldv_2_container_struct_cdrom_device_ops = ldv_xmalloc_unknown_size(0);
     572             :  /* LDV {"action": "DEFAULT_ALLOC_4", "type": "CONDITION_END"} */
     573             : 
     574             :  /* LDV {"action": "INIT", "type": "CONDITION_BEGIN", "comment": "Alloc memory for common callback arguments."} */
     575           3 :  ldv_2_resource_struct_cdrom_device_info_ptr = ldv_xmalloc_unknown_size(0);
     576           3 :  ldv_2_resource_struct_cdrom_mcn_ptr = ldv_xmalloc_unknown_size(0);
     577           3 :  ldv_2_resource_struct_cdrom_multisession_ptr = ldv_xmalloc_unknown_size(0);
     578           3 :  ldv_2_resource_struct_packet_command_ptr = ldv_xmalloc_unknown_size(0);
     579             :  /* LDV {"action": "INIT", "type": "CONDITION_END"} */
     580             : 
     581             :  /* LDV {"action": "MAIN", "type": "SUBPROCESS_BEGIN", "comment": "Start with an initialization callback."} */
     582             :  /* LDV {"action": "MAIN", "type": "SUBPROCESS_END"} */
     583             : 
     584             :  /* Jump to a subprocess 'main' initial state */
     585           1 :  goto ldv_main_2;
     586             :  /* End of the process */
     587             :  return;
     588           1 : 
     589             :  /* Sbprocess main */
     590             :  ldv_main_2:
     591             :  /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
     592             : 
     593           4 :  if (ldv_undef_int()) {
     594             :   /* LDV {"action": "PRE_CALL_12", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
     595             :   /* LDV {"action": "PRE_CALL_12", "type": "CONDITION_END"} */
     596             : 
     597             :   /* LDV {"action": "PROBE", "type": "CALL_BEGIN", "callback": true, "comment": "Call an initialization callback. Invoke callback open from cdrom_device_ops."} */
     598             :   /* LDV {"type": "CALLBACK", "call": "ldv_2_ret_default = ((& sr_open))(ldv_2_resource_struct_cdrom_device_info_ptr, ldv_2_ldv_param_12_1_default);", "comment": "probe"} */
     599           2 :   ldv_2_ret_default = ldv_partially_ordered_scenario_probe_2_12(ldv_2_container_struct_cdrom_device_ops->open, ldv_2_resource_struct_cdrom_device_info_ptr, ldv_2_ldv_param_12_1_default);
     600             :   /* Callback post-call */
     601           2 :   ldv_2_ret_default = ldv_filter_err_code(ldv_2_ret_default);
     602             :   /* LDV {"action": "PROBE", "type": "CALL_END"} */
     603             : 
     604             :   /* LDV {"action": "POST_CALL_12", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
     605             :   /* LDV {"action": "POST_CALL_12", "type": "CONDITION_END"} */
     606             : 
     607           4 :   if (ldv_undef_int()) {
     608             :    /* LDV {"action": "Y_RET", "type": "CONDITION_BEGIN", "comment": "Initialization has been successful."} */
     609           2 :    ldv_assume(ldv_2_ret_default == 0);
     610             :    /* LDV {"action": "Y_RET", "type": "CONDITION_END"} */
     611             : 
     612             :    /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Initializations are done, proceed to the other callbacks."} */
     613             :    /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
     614             : 
     615             :    /* Jump to a subprocess 'call' initial state */
     616           1 :    goto ldv_call_2;
     617             :   }
     618             :   else {
     619             :    /* LDV {"action": "N_RET", "type": "CONDITION_BEGIN", "comment": "Initialization has failed."} */
     620           2 :    ldv_assume(ldv_2_ret_default != 0);
     621             :    /* LDV {"action": "N_RET", "type": "CONDITION_END"} */
     622             : 
     623             :    /* LDV {"action": "MAIN", "type": "SUBPROCESS_BEGIN", "comment": "Start with an initialization callback."} */
     624             :    /* LDV {"action": "MAIN", "type": "SUBPROCESS_END"} */
     625             : 
     626             :    /* Jump to a subprocess 'main' initial state */
     627           1 :    goto ldv_main_2;
     628             :   }
     629             :  }
     630             :  else {
     631             :   /* LDV {"action": "FREE", "type": "CONDITION_BEGIN", "comment": "Free memory for common callback arguments."} */
     632           2 :   ldv_free(ldv_2_resource_struct_cdrom_device_info_ptr);
     633           2 :   ldv_free(ldv_2_resource_struct_cdrom_mcn_ptr);
     634           2 :   ldv_free(ldv_2_resource_struct_cdrom_multisession_ptr);
     635           2 :   ldv_free(ldv_2_resource_struct_packet_command_ptr);
     636             :   /* LDV {"action": "FREE", "type": "CONDITION_END"} */
     637             : 
     638             :   /* LDV {"action": "DEFAULT_FREE_4", "type": "CONDITION_BEGIN", "comment": "Free memory before default deregistration."} */
     639           2 :   ldv_free(ldv_2_container_struct_cdrom_device_ops);
     640             :   /* LDV {"action": "DEFAULT_FREE_4", "type": "CONDITION_END"} */
     641             : 
     642             :   /* LDV {"action": "DEFAULT_DEREGISTER_4", "type": "RECEIVE_BEGIN", "comment": "Finish STRUCT_CDROM_DEVICE_OPS callbacks invocations scenario."} */
     643             :   /* Skip a non-replicative signal receiving */
     644             :   /* LDV {"action": "DEFAULT_DEREGISTER_4", "type": "RECEIVE_END"} */
     645             : 
     646             :   /* Exit function at a terminal state */
     647           1 :   return;
     648             :  }
     649             :  /* End of the subprocess 'main' */
     650             :  return;
     651           1 : 
     652             :  /* Sbprocess call */
     653             :  ldv_call_2:
     654             :  /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
     655             : 
     656           4 :  if (ldv_undef_int()) {
     657             :   /* LDV {"action": "RELEASE", "type": "CALL_BEGIN", "callback": true, "comment": "Do uninitializations before deregistration. Invoke callback release from cdrom_device_ops."} */
     658             :   /* LDV {"type": "CALLBACK", "call": "((& sr_release))(ldv_2_resource_struct_cdrom_device_info_ptr);", "comment": "release"} */
     659           2 :   ldv_partially_ordered_scenario_release_2_2(ldv_2_container_struct_cdrom_device_ops->release, ldv_2_resource_struct_cdrom_device_info_ptr);
     660             :   /* LDV {"action": "RELEASE", "type": "CALL_END"} */
     661             : 
     662             :   /* LDV {"action": "MAIN", "type": "SUBPROCESS_BEGIN", "comment": "Start with an initialization callback."} */
     663             :   /* LDV {"action": "MAIN", "type": "SUBPROCESS_END"} */
     664             : 
     665             :   /* Jump to a subprocess 'main' initial state */
     666           1 :   goto ldv_main_2;
     667             :  }
     668             :  else {
     669             :   /* LDV {"action": "PRE_CALL_4", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
     670             :   /* LDV {"action": "PRE_CALL_4", "type": "CONDITION_END"} */
     671             : 
     672           2 :   switch (ldv_undef_int()) {
     673           3 :    case 1: {
     674             :     /* LDV {"action": "PRE_CALL_35", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
     675             :     /* LDV {"action": "PRE_CALL_35", "type": "CONDITION_END"} */
     676             : 
     677             :     /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback tray_move from cdrom_device_ops."} */
     678             :     /* LDV {"type": "CALLBACK", "call": "((& sr_tray_move))(ldv_2_resource_struct_cdrom_device_info_ptr, ldv_2_ldv_param_35_1_default);", "comment": "callback"} */
     679           2 :     ldv_partially_ordered_scenario_callback_2_35(ldv_2_callback_tray_move, ldv_2_resource_struct_cdrom_device_info_ptr, ldv_2_ldv_param_35_1_default);
     680             :     /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
     681             : 
     682             :     /* LDV {"action": "POST_CALL_35", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
     683             :     /* LDV {"action": "POST_CALL_35", "type": "CONDITION_END"} */
     684             : 
     685           1 :     break;
     686           1 :    }
     687           3 :    case 2: {
     688             :     /* LDV {"action": "PRE_CALL_32", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
     689             :     /* LDV {"action": "PRE_CALL_32", "type": "CONDITION_END"} */
     690             : 
     691             :     /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback select_speed from cdrom_device_ops."} */
     692             :     /* LDV {"type": "CALLBACK", "call": "((& sr_select_speed))(ldv_2_resource_struct_cdrom_device_info_ptr, ldv_2_ldv_param_32_1_default);", "comment": "callback"} */
     693           2 :     ldv_partially_ordered_scenario_callback_2_32(ldv_2_callback_select_speed, ldv_2_resource_struct_cdrom_device_info_ptr, ldv_2_ldv_param_32_1_default);
     694             :     /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
     695             : 
     696             :     /* LDV {"action": "POST_CALL_32", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
     697             :     /* LDV {"action": "POST_CALL_32", "type": "CONDITION_END"} */
     698             : 
     699           1 :     break;
     700           1 :    }
     701           3 :    case 3: {
     702             :     /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback reset from cdrom_device_ops."} */
     703             :     /* LDV {"type": "CALLBACK", "call": "((& sr_reset))(ldv_2_resource_struct_cdrom_device_info_ptr);", "comment": "callback"} */
     704           2 :     ldv_partially_ordered_scenario_callback_2_31(ldv_2_callback_reset, ldv_2_resource_struct_cdrom_device_info_ptr);
     705             :     /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
     706             : 
     707           1 :     break;
     708           1 :    }
     709           3 :    case 4: {
     710             :     /* LDV {"action": "PRE_CALL_28", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
     711             :     /* LDV {"action": "PRE_CALL_28", "type": "CONDITION_END"} */
     712             : 
     713             :     /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback media_changed from cdrom_device_ops."} */
     714             :     /* LDV {"type": "CALLBACK", "call": "((& sr_media_change))(ldv_2_resource_struct_cdrom_device_info_ptr, ldv_2_ldv_param_28_1_default);", "comment": "callback"} */
     715           2 :     ldv_partially_ordered_scenario_callback_2_28(ldv_2_callback_media_changed, ldv_2_resource_struct_cdrom_device_info_ptr, ldv_2_ldv_param_28_1_default);
     716             :     /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
     717             : 
     718             :     /* LDV {"action": "POST_CALL_28", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
     719             :     /* LDV {"action": "POST_CALL_28", "type": "CONDITION_END"} */
     720             : 
     721           1 :     break;
     722           1 :    }
     723           3 :    case 5: {
     724             :     /* LDV {"action": "PRE_CALL_25", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
     725             :     /* LDV {"action": "PRE_CALL_25", "type": "CONDITION_END"} */
     726             : 
     727             :     /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback lock_door from cdrom_device_ops."} */
     728             :     /* LDV {"type": "CALLBACK", "call": "((& sr_lock_door))(ldv_2_resource_struct_cdrom_device_info_ptr, ldv_2_ldv_param_25_1_default);", "comment": "callback"} */
     729           2 :     ldv_partially_ordered_scenario_callback_2_25(ldv_2_callback_lock_door, ldv_2_resource_struct_cdrom_device_info_ptr, ldv_2_ldv_param_25_1_default);
     730             :     /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
     731             : 
     732             :     /* LDV {"action": "POST_CALL_25", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
     733             :     /* LDV {"action": "POST_CALL_25", "type": "CONDITION_END"} */
     734             : 
     735           1 :     break;
     736           1 :    }
     737           3 :    case 6: {
     738             :     /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback get_mcn from cdrom_device_ops."} */
     739             :     /* LDV {"type": "CALLBACK", "call": "((& sr_get_mcn))(ldv_2_resource_struct_cdrom_device_info_ptr, ldv_2_resource_struct_cdrom_mcn_ptr);", "comment": "callback"} */
     740           2 :     ldv_partially_ordered_scenario_callback_2_24(ldv_2_callback_get_mcn, ldv_2_resource_struct_cdrom_device_info_ptr, ldv_2_resource_struct_cdrom_mcn_ptr);
     741             :     /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
     742             : 
     743           1 :     break;
     744           1 :    }
     745           3 :    case 7: {
     746             :     /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback get_last_session from cdrom_device_ops."} */
     747             :     /* LDV {"type": "CALLBACK", "call": "((& sr_get_last_session))(ldv_2_resource_struct_cdrom_device_info_ptr, ldv_2_resource_struct_cdrom_multisession_ptr);", "comment": "callback"} */
     748           2 :     ldv_partially_ordered_scenario_callback_2_23(ldv_2_callback_get_last_session, ldv_2_resource_struct_cdrom_device_info_ptr, ldv_2_resource_struct_cdrom_multisession_ptr);
     749             :     /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
     750             : 
     751           1 :     break;
     752           1 :    }
     753           3 :    case 8: {
     754             :     /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback generic_packet from cdrom_device_ops."} */
     755             :     /* LDV {"type": "CALLBACK", "call": "((& sr_packet))(ldv_2_resource_struct_cdrom_device_info_ptr, ldv_2_resource_struct_packet_command_ptr);", "comment": "callback"} */
     756           2 :     ldv_partially_ordered_scenario_callback_2_22(ldv_2_callback_generic_packet, ldv_2_resource_struct_cdrom_device_info_ptr, ldv_2_resource_struct_packet_command_ptr);
     757             :     /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
     758             : 
     759           1 :     break;
     760           1 :    }
     761           3 :    case 9: {
     762             :     /* LDV {"action": "PRE_CALL_19", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
     763             :     /* LDV {"action": "PRE_CALL_19", "type": "CONDITION_END"} */
     764             : 
     765             :     /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback drive_status from cdrom_device_ops."} */
     766             :     /* LDV {"type": "CALLBACK", "call": "((& sr_drive_status))(ldv_2_resource_struct_cdrom_device_info_ptr, ldv_2_ldv_param_19_1_default);", "comment": "callback"} */
     767           2 :     ldv_partially_ordered_scenario_callback_2_19(ldv_2_callback_drive_status, ldv_2_resource_struct_cdrom_device_info_ptr, ldv_2_ldv_param_19_1_default);
     768             :     /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
     769             : 
     770             :     /* LDV {"action": "POST_CALL_19", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
     771             :     /* LDV {"action": "POST_CALL_19", "type": "CONDITION_END"} */
     772             : 
     773           1 :     break;
     774           1 :    }
     775           3 :    case 10: {
     776             :     /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback audio_ioctl from cdrom_device_ops."} */
     777             :     /* LDV {"type": "CALLBACK", "call": "((& sr_audio_ioctl))(ldv_2_resource_struct_cdrom_device_info_ptr, ldv_2_ldv_param_4_1_default, ldv_2_resource_struct_cdrom_mcn_ptr);", "comment": "callback"} */
     778           2 :     ldv_partially_ordered_scenario_callback_2_4(ldv_2_callback_audio_ioctl, ldv_2_resource_struct_cdrom_device_info_ptr, ldv_2_ldv_param_4_1_default, ldv_2_resource_struct_cdrom_mcn_ptr);
     779             :     /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
     780             : 
     781           1 :     break;
     782           1 :    }
     783           2 :    default: ldv_stop();
     784           1 :   }
     785           0 :  }
     786             :  /* LDV {"action": "POST_CALL_4", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
     787           0 :  /* LDV {"action": "POST_CALL_4", "type": "CONDITION_END"} */
     788             : 
     789             :  /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Initializations are done, proceed to the other callbacks."} */
     790             :  /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
     791             : 
     792             :  /* Jump to a subprocess 'call' initial state */
     793          10 :  goto ldv_call_2;
     794             :  /* End of the subprocess 'call' */
     795             :  return;
     796             :  /* LDV {"comment": "End of control function based on process 'partially_ordered_scenario(struct_cdrom_device_ops)'", "type": "CONTROL_FUNCTION_END", "function": "ldv_partially_ordered_scenario_2"} */
     797             : }
     798             : 
     799             : /* AUX_FUNC_CALLBACK ldv_partially_ordered_scenario_callback_1_18 */
     800             : void ldv_partially_ordered_scenario_callback_1_18(int (*arg0)(struct block_device *, fmode_t , unsigned int, long unsigned int), struct block_device *arg1, unsigned int arg2, unsigned int arg3, long unsigned int arg4) {
     801           2 :  ((& sr_block_ioctl))(arg1, arg2, arg3, arg4);
     802           1 : }
     803             : 
     804             : /* AUX_FUNC_CALLBACK ldv_partially_ordered_scenario_callback_1_21 */
     805             : void ldv_partially_ordered_scenario_callback_1_21(int (*arg0)(struct gendisk *), struct gendisk *arg1) {
     806           2 :  ((& sr_block_media_changed))(arg1);
     807           1 : }
     808             : 
     809             : /* AUX_FUNC_CALLBACK ldv_partially_ordered_scenario_callback_1_4 */
     810             : void ldv_partially_ordered_scenario_callback_1_4(int (*arg0)(struct scsi_cmnd *), struct scsi_cmnd *arg1) {
     811           4 :  ((& sr_done))(arg1);
     812           1 : }
     813             : 
     814             : /* AUX_FUNC_CALLBACK ldv_partially_ordered_scenario_callback_2_19 */
     815             : void ldv_partially_ordered_scenario_callback_2_19(int (*arg0)(struct cdrom_device_info *, int), struct cdrom_device_info *arg1, int arg2) {
     816           5 :  ((& sr_drive_status))(arg1, arg2);
     817           1 : }
     818             : 
     819             : /* AUX_FUNC_CALLBACK ldv_partially_ordered_scenario_callback_2_22 */
     820             : void ldv_partially_ordered_scenario_callback_2_22(int (*arg0)(struct cdrom_device_info *, struct packet_command *), struct cdrom_device_info *arg1, struct packet_command *arg2) {
     821           2 :  ((& sr_packet))(arg1, arg2);
     822           1 : }
     823             : 
     824             : /* AUX_FUNC_CALLBACK ldv_partially_ordered_scenario_callback_2_23 */
     825             : void ldv_partially_ordered_scenario_callback_2_23(int (*arg0)(struct cdrom_device_info *, struct cdrom_multisession *), struct cdrom_device_info *arg1, struct cdrom_multisession *arg2) {
     826           2 :  ((& sr_get_last_session))(arg1, arg2);
     827           1 : }
     828             : 
     829             : /* AUX_FUNC_CALLBACK ldv_partially_ordered_scenario_callback_2_24 */
     830             : void ldv_partially_ordered_scenario_callback_2_24(int (*arg0)(struct cdrom_device_info *, struct cdrom_mcn *), struct cdrom_device_info *arg1, struct cdrom_mcn *arg2) {
     831           3 :  ((& sr_get_mcn))(arg1, arg2);
     832           1 : }
     833             : 
     834             : /* AUX_FUNC_CALLBACK ldv_partially_ordered_scenario_callback_2_25 */
     835             : void ldv_partially_ordered_scenario_callback_2_25(int (*arg0)(struct cdrom_device_info *, int), struct cdrom_device_info *arg1, int arg2) {
     836           2 :  ((& sr_lock_door))(arg1, arg2);
     837           1 : }
     838             : 
     839             : /* AUX_FUNC_CALLBACK ldv_partially_ordered_scenario_callback_2_28 */
     840             : void ldv_partially_ordered_scenario_callback_2_28(int (*arg0)(struct cdrom_device_info *, int), struct cdrom_device_info *arg1, int arg2) {
     841           5 :  ((& sr_media_change))(arg1, arg2);
     842           1 : }
     843             : 
     844             : /* AUX_FUNC_CALLBACK ldv_partially_ordered_scenario_callback_2_31 */
     845             : void ldv_partially_ordered_scenario_callback_2_31(int (*arg0)(struct cdrom_device_info *), struct cdrom_device_info *arg1) {
     846           2 :  ((& sr_reset))(arg1);
     847           1 : }
     848             : 
     849             : /* AUX_FUNC_CALLBACK ldv_partially_ordered_scenario_callback_2_32 */
     850             : void ldv_partially_ordered_scenario_callback_2_32(int (*arg0)(struct cdrom_device_info *, int), struct cdrom_device_info *arg1, int arg2) {
     851           2 :  ((& sr_select_speed))(arg1, arg2);
     852           1 : }
     853             : 
     854             : /* AUX_FUNC_CALLBACK ldv_partially_ordered_scenario_callback_2_35 */
     855             : void ldv_partially_ordered_scenario_callback_2_35(int (*arg0)(struct cdrom_device_info *, int), struct cdrom_device_info *arg1, int arg2) {
     856           2 :  ((& sr_tray_move))(arg1, arg2);
     857           1 : }
     858             : 
     859             : /* AUX_FUNC_CALLBACK ldv_partially_ordered_scenario_callback_2_4 */
     860             : void ldv_partially_ordered_scenario_callback_2_4(int (*arg0)(struct cdrom_device_info *, unsigned int, void *), struct cdrom_device_info *arg1, unsigned int arg2, void *arg3) {
     861           5 :  ((& sr_audio_ioctl))(arg1, arg2, arg3);
     862           1 : }
     863             : 
     864             : /* AUX_FUNC_CALLBACK ldv_partially_ordered_scenario_probe_1_11 */
     865             : int ldv_partially_ordered_scenario_probe_1_11(int (*arg0)(struct device *), struct device *arg1) {
     866           7 :  return ((& sr_probe))(arg1);
     867           1 : }
     868             : 
     869             : /* AUX_FUNC_CALLBACK ldv_partially_ordered_scenario_probe_1_22 */
     870             : int ldv_partially_ordered_scenario_probe_1_22(int (*arg0)(struct block_device *, fmode_t ), struct block_device *arg1, unsigned int arg2) {
     871           4 :  return ((& sr_block_open))(arg1, arg2);
     872             : }
     873             : 
     874           1 : /* AUX_FUNC_CALLBACK ldv_partially_ordered_scenario_probe_2_12 */
     875             : int ldv_partially_ordered_scenario_probe_2_12(int (*arg0)(struct cdrom_device_info *, int), struct cdrom_device_info *arg1, int arg2) {
     876           3 :  return ((& sr_open))(arg1, arg2);
     877             : }
     878             : 
     879           1 : /* AUX_FUNC_CALLBACK ldv_partially_ordered_scenario_release_1_15 */
     880             : void ldv_partially_ordered_scenario_release_1_15(int (*arg0)(struct gendisk *, fmode_t ), struct gendisk *arg1, unsigned int arg2) {
     881           2 :  ((& sr_block_release))(arg1, arg2);
     882           1 : }
     883             : 
     884             : /* AUX_FUNC_CALLBACK ldv_partially_ordered_scenario_release_1_2 */
     885             : void ldv_partially_ordered_scenario_release_1_2(int (*arg0)(struct device *), struct device *arg1) {
     886           2 :  ((& sr_remove))(arg1);
     887           1 : }
     888             : 
     889             : /* AUX_FUNC_CALLBACK ldv_partially_ordered_scenario_release_2_2 */
     890             : void ldv_partially_ordered_scenario_release_2_2(void (*arg0)(struct cdrom_device_info *), struct cdrom_device_info *arg1) {
     891           3 :  ((& sr_release))(arg1);
     892           1 : }
     893             : 
     894             : /* AUX_FUNC main */
     895             : int main() {
     896           1 :  ldv_main_7(0);
     897           0 :  return 0;
     898             : }
     899             : 
     900             : 
     901             : /* AUX_FUNC  ERR_PTR */
     902             : static inline void *ERR_PTR (long int error)
     903             : {
     904             : 
     905             :  return ldv_err_ptr(error);
     906             : }
     907             : 
     908             : /* AUX_FUNC  PTR_ERR */
     909             : static inline long int PTR_ERR (void const *ptr)
     910             : {
     911             : 
     912             :  return ldv_ptr_err(ptr);
     913             : }
     914             : 
     915             : /* AUX_FUNC  IS_ERR */
     916             : static inline long int IS_ERR (void const *ptr)
     917             : {
     918             : 
     919             :  return ldv_is_err(ptr);
     920             : }
     921             : 
     922             : /* AUX_FUNC  IS_ERR_OR_NULL */
     923             : static inline long int IS_ERR_OR_NULL (void const *ptr)
     924             : {
     925             : 
     926             :  return ldv_is_err_or_null(ptr);
     927             : }
     928             : 
     929             : /* AUX_FUNC  kzalloc */
     930             : static inline void *kzalloc (size_t size, gfp_t flags)
     931             : {
     932           2 : 
     933           6 :  return ldv_kzalloc(size, flags);
     934             : }
     935             : 
     936             : /* AUX_FUNC  ldv_dev_get_drvdata_6 */
     937             : void *ldv_dev_get_drvdata_6 (struct device const *dev)
     938             : {
     939           1 : 
     940           3 :  return ldv_dev_get_drvdata(dev);
     941             : }
     942             : 
     943             : /* AUX_FUNC  ldv_scsi_register_driver_7 */
     944             : int ldv_scsi_register_driver_7 (struct device_driver *ldv_func_arg1)
     945             : {
     946           1 : 
     947             :  /* LDV {"type": "KERNEL_MODEL", "comment": "Perform the model code of the function 'scsi_register_driver'"} */
     948           4 :  return ldv_emg_scsi_register_driver(ldv_func_arg1);
     949             : }
     950             : 
     951             : /* AUX_FUNC  ldv_driver_unregister_8 */
     952             : void ldv_driver_unregister_8 (struct device_driver *ldv_func_arg1)
     953             : {
     954             : 
     955             :  /* LDV {"type": "KERNEL_MODEL", "comment": "Perform the model code of the function 'driver_unregister'"} */
     956           4 :  ldv_emg_driver_unregister(ldv_func_arg1);
     957           2 : }

Generated by: LCOV version 1.10