Create different handle of class in the macro based on number of times macro is called

In reply to dave_59:

@dave_59,
This macro is used to take the list of cmds and wait for each cmd resp i.e cmd_seq.get_resp and if that cmd is completed we push that cmd into cmd completed queue. one of feature that user can pass the count that for how many cmds it should wait.
e.g. my_macro(cmd_list,10) here cmd_list has 20cmds and they already driven from driver.Now once i received response of 10 cmds i can move further in my testcase util this time I would block the testcase at that point.

why Forked, there can be another scenario where we can have two types of cmds
e.g.

fork 
begin
 my_macro(read_cmd_list,10)
end
begin
 my_macro(write_cmd_list,5)
end

in this case, raed and write cmd list have 20 cmds each and after 10 read and 5 write response i can move further in my testcase.

But with current implementation, only the last thread update the utils_h.cmd_list.

This is because one class handle and when 2nd thread start it update the handle pointer.

what might be another solution if we don’t use Macro. This utility is for user who doesn’t have much knowledge of Implementation,where they just have to call one macro with proper arguments. adding more steps like add_cmds function would be burden on them.