Changeset 3359 for trunk/src/kmk


Ignore:
Timestamp:
Jun 5, 2020, 6:17:17 PM (5 years ago)
Author:
bird
Message:

kmk,kFsCache: Added variant of kFsCacheInvalidateAll that also closes directory handles, we need to do this befor ere-executing kmk after having remake some include file we needed. It messes up fetching otherwise.

Location:
trunk/src/kmk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kmk/dir-nt-bird.c

    r3203 r3359  
    660660
    661661/**
     662 * Invalidate the whole directory cache and closes all open handles.
     663 *
     664 * Used by $(dircache-ctl invalidate-and-close-dirs)
     665 * @param   including_root      Also close the root directory.
     666 * @note    Multi-thread safe.
     667 */
     668void dir_cache_invalid_all_and_close_dirs(int including_root)
     669{
     670    g_cInvalidates++;
     671    kFsCacheInvalidateAllAndCloseDirs(g_pFsCache, !!including_root);
     672}
     673
     674/**
    662675 * Invalidate missing bits of the directory cache.
    663676 *
  • trunk/src/kmk/function.c

    r3351 r3359  
    57625762        O (error, reading_file, "$(dircache-ctl invalidate) takes no parameters");
    57635763      dir_cache_invalid_all ();
     5764    }
     5765  else if (strcmp (cmd, "invalidate-and-close-dirs") == 0)
     5766    {
     5767      if (argv[1] != NULL)
     5768        O (error, reading_file, "$(dircache-ctl invalidate) takes no parameters");
     5769      dir_cache_invalid_all_and_close_dirs (0 /*including_root*/);
    57645770    }
    57655771  else if (strcmp (cmd, "invalidate-missing") == 0)
  • trunk/src/kmk/makeint.h

    r3322 r3359  
    11761176extern void dir_cache_invalid_after_job (void);
    11771177extern void dir_cache_invalid_all (void);
     1178extern void dir_cache_invalid_all_and_close_dirs (int including_root);
    11781179extern void dir_cache_invalid_missing (void);
    11791180extern int dir_cache_volatile_dir (const char *dir);
  • trunk/src/kmk/w32/winchildren.c

    r3358 r3359  
    36483648     * going on in the "exec'ed" make by keeping directories open.
    36493649     */
    3650     dir_cache_invalid_all();
     3650    dir_cache_invalid_all_and_close_dirs(1);
    36513651#endif
    36523652
Note: See TracChangeset for help on using the changeset viewer.