anchor.diff:  	{ok, {reply, Reply, NState}} ->
   	    Debug1 = reply(Name, From, Reply, NState, Debug),
   	    loop(Parent, Name, NState, Mod, infinity, HibernateAfterTimeout, Debug1);
  -	{ok, {reply, Reply, NState, Time1}} ->
  +	{ok, {reply, Reply, NState, TimeoutOrHibernate}} when ?is_timeout(TimeoutOrHibernate) orelse TimeoutOrHibernate =:= hibernate ->
   	    Debug1 = reply(Name, From, Reply, NState, Debug),
  -	    loop(Parent, Name, NState, Mod, Time1, HibernateAfterTimeout, Debug1);
  -	{ok, {noreply, NState}} ->
  -	    Debug1 = sys:handle_debug(Debug, fun print_event/3, Name,
  -				      {noreply, NState}),
  -	    loop(Parent, Name, NState, Mod, infinity, HibernateAfterTimeout, Debug1);
  -	{ok, {noreply, NState, Time1}} ->
  -	    Debug1 = sys:handle_debug(Debug, fun print_event/3, Name,
  -				      {noreply, NState}),
  -	    loop(Parent, Name, NState, Mod, Time1, HibernateAfterTimeout, Debug1);
  +	    loop(Parent, Name, NState, Mod, TimeoutOrHibernate, HibernateAfterTimeout, Debug1);
  +	{ok, {reply, Reply, NState, {continue, _}=Continue}} ->
  +	    Debug1 = reply(Name, From, Reply, NState, Debug),
  +	    loop(Parent, Name, NState, Mod, Continue, HibernateAfterTimeout, Debug1);
   	{ok, {stop, Reason, Reply, NState}} ->
   	    try
   		terminate(Reason, ?STACKTRACE(), Name, From, Msg, Mod, NState, Debug)
  
positive.code:          State   :: term(),
           Timeout :: timeout()
         ) ->
                          no_return().
  %%
  enter_loop(Mod, Options, State, ServerName = {Scope, _})
    when Scope == local; Scope == global ->
      enter_loop(Mod, Options, State, ServerName, infinity);
  %%
  enter_loop(Mod, Options, State, ServerName = {via, _, _}) ->
      enter_loop(Mod, Options, State, ServerName, infinity);
  %%
  enter_loop(Mod, Options, State, Timeout) ->
      enter_loop(Mod, Options, State, self(), Timeout).
  
  -spec enter_loop(
          Module     :: module(),
          Options    :: [enter_loop_opt()],
          State      :: term(),
          ServerName :: server_name() | pid(),
          Timeout    :: timeout()
         ) ->
                          no_return().
  %%
  enter_loop(Mod, Options, State, ServerName, Timeout) ->
      Name = gen:get_proc_name(ServerName),
      Parent = gen:get_parent(),
      Debug = gen:debug_options(Name, Options),
      HibernateAfterTimeout = gen:hibernate_after(Options),
      loop(Parent, Name, State, Mod, Timeout, HibernateAfterTimeout, Debug).
  
  %%%========================================================================
  %%% Gen-callback functions
  
negative.code:        ) ->
                          no_return().
  %%
  enter_loop(Mod, Options, State) when is_atom(Mod) andalso is_list(Options) ->
      enter_loop(Mod, Options, State, self(), infinity).
  
  -spec enter_loop(
  