VirtualBox

Changeset 2912 in kBuild for trunk/src/kmk/w32


Ignore:
Timestamp:
Sep 14, 2016 1:36:15 PM (9 years ago)
Author:
bird
Message:

rewrote kmk_redirect to skip the separate process. Added chache invalidation after directory deletion for addressing kmk rebuild and fetching.

Location:
trunk/src/kmk/w32
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kmk/w32/include/sub_proc.h

    r2844 r2912  
    5050#ifdef KMK
    5151EXTERN_DECL(int process_kmk_register_submit, (HANDLE hEvent, intptr_t clue, pid_t *pPid));
     52EXTERN_DECL(int process_kmk_register_redirect, (HANDLE hProcess, pid_t *pPid));
    5253#endif
    5354
  • trunk/src/kmk/w32/subproc/sub_proc.c

    r2886 r2912  
    199199
    200200#ifdef KMK
     201
    201202/**
    202203 * Interface used by kmkbuiltin/kSubmit.c to register stuff going down in a
     
    223224        return -1;
    224225}
    225 #endif
     226
     227/**
     228 * Interface used by kmkbuiltin/kRedirect.c to register a spawned process.
     229 *
     230 * @returns 0 on success, -1 if there are too many sub-processes already.
     231 * @param   hProcess            The process handle.
     232 * @param   pPid                Where to return the pid that job.c expects.
     233 */
     234int
     235process_kmk_register_redirect(HANDLE hProcess, pid_t *pPid)
     236{
     237        if (proc_index < MAXIMUM_WAIT_OBJECTS) {
     238                sub_process *pSubProc = (sub_process *)xcalloc(sizeof(*pSubProc));
     239                pSubProc->enmType = kRegular;
     240                pSubProc->pid     = (intptr_t)hProcess;
     241
     242                proc_array[proc_index++] = pSubProc;
     243                *pPid = (intptr_t)pSubProc;
     244                return 0;
     245        }
     246        return -1;
     247}
     248
     249#endif /* KMK */
    226250
    227251/*
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette