gecko/mozglue/build/Nuwa.cpp

Nuwa模块专注于线程的复制、创建、冻结及管理,提供了一系列的函数如AddNewProcess, ForkIPCProcess等,用于处理进程间通信、线程信息获取与更新、线程状态检查等功能。

gecko/mozglue/build/Nuwa.cpp


▼ functions
   -AddNewProcess(pid_t pid, NuwaProtoFdInfo *aInfoList, int aInfoSize)
   -AfterForkHook()
   -CloseAllProtoSockets(NuwaProtoFdInfo *aInfoList, int aInfoSize)
   -DupeSingleFd(int newFd, int origFd)
   -EnsureThreadExited(thread_info_t *tinfo)
   -ForkIPCProcess()
   -GetCurThreadInfo()
   -GetThreadInfo(pthread_t threadID)
   -GetThreadInfoInner(pthread_t threadID)


    IsNuwaProcess()
    IsNuwaReady()
    MakeNuwaProcess()
   -MaybeCleanUpDetachedThread(thread_info_t *tinfo)
    NuwaAddConstructor(void (*construct)(void *), void *arg)
    NuwaAddFinalConstructor(void (*construct)(void *), void *arg)
    NuwaAddThreadConstructor(void (*aConstruct)(void *), void *aArg)
    NuwaAssertNotFrozen(unsigned int aThread, const char* aThreadName)
    NuwaCheckpointCurrentThread1()
    NuwaCheckpointCurrentThread2(int setjmpCond)
    NuwaFreezeCurrentThread()
    NuwaMarkCurrentThread(void (*recreate)(void *), void *arg)
    NuwaSkipCurrentThread()
    NuwaSpawn()
    NuwaSpawnPrepare()
    NuwaSpawnWait()
    PrepareNuwaProcess()


   -PrepareProtoSockets(NuwaProtoFdInfo *aInfoList, int aInfoSize)
   -RecreateEpollFds()
   -RecreateThreads()
   -ReplaceIPC(NuwaProtoFdInfo *aInfoList, int aInfoSize)
    ReplaceSignalFds()
   -RestoreTLSInfo(thread_info_t *tinfo)
   -RunCustomRecreation()
   -SaveTLSInfo(thread_info_t *tinfo)


    __wrap_close(int aFd)
    __wrap_epoll_create(int size)
    __wrap_epoll_ctl(int aEpollFd, int aOp, int aFd, struct epoll_event *aEvent)
    __wrap_epoll_wait(int epfd, struct epoll_event *events, int maxevents, int timeout)
    __wrap_pipe(int __pipedes[2])
    __wrap_pipe2(int __pipedes[2], int flags)
    __wrap_poll(struct pollfd *fds, nfds_t nfds, int timeout)
    __wrap_pthread_cond_timedwait(pthread_cond_t *cond, pthread_mutex_t *mtx, const struct timespec *abstime)
    __wrap_pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mtx)
    __wrap_pthread_create(pthread_t *thread, const pthread_attr_t *attr, void *(*start_routine) (void *), void *arg)
    __wrap_pthread_join(pthread_t thread, void **retval)
    __wrap_pthread_key_create(pthread_key_t *key, void (*destructor)(void*))
    __wrap_pthread_key_delete(pthread_key_t key)
    __wrap_pthread_mutex_lock(pthread_mutex_t *mtx)
    __wrap_pthread_mutex_trylock(pthread_mutex_t *mtx)
    __wrap_pthread_self()
    __wrap_socketpair(int domain, int type, int protocol, int sv[2])

 

线程创建等
   -_thread_create_startup(void *arg)
   -getPageSize(void)
   -invalidate_thread_info(void *arg)
   -safe_thread_info_cleanup(void *arg)
   -thread_attr_init(thread_info_t *tinfo, const pthread_attr_t *tattr)
   -thread_create_startup(void *arg)
   -thread_info_cleanup(void *arg)
   -thread_info_new(void)
   -thread_recreate(thread_info_t *tinfo)
   -thread_recreate_startup(void *arg)

 

 

nuwa用于具体一个个线程去复制创建冻结等,

 

 

评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值